and foobar gets printed in every line logged by that object.
One use case where this is useful is in Lambdas: by initializing the logger with the lambda name, one can easily filter / see which lambda function emitted the line when using a log aggregation tool, such as CloudWatch or ElasticSearch.
I haven't found a way of obtaining the same with rlog.
In Python I can do something like
and
foobar
gets printed in every line logged by that object.One use case where this is useful is in Lambdas: by initializing the logger with the lambda name, one can easily filter / see which lambda function emitted the line when using a log aggregation tool, such as CloudWatch or ElasticSearch.
I haven't found a way of obtaining the same with
rlog
.Happy to contribute with a PR if needs be.