Kevin McNamee
Kevin McNamee
The problem could be that the print function is buffering the output. Try: ```python print(serialized, file=sys.stdout, flush=True) ```
You could create a custom sink to remove it. ```python from loguru import logger import json import sys def datadog_sink(message): message_json = json.loads(message) message_json.pop("text") serialized = json.dumps(message_json, default=str) print(serialized, file=sys.stdout,...
I am also using Datadog. Loguru emits a JSON structure that contains a "record" element containing all the log details. The fields in the record can be rearranged using a...
Nice, thanks @Delgan! To fill in some more context, starting with an ID, we are requesting data from a service and then using the result to send more requests to...
Hi @Delgan, I agree explicitly adding the keyword arguments to the logger call is clearer. > I intend to discontinue the use of keyword arguments for formatting purposes and instead...
You could simply use the list of log levels directly which includes any custom levels added: ```python from loguru import logger logger.level("CUSTOM", no=15, color="", icon="@") print(logger._core.levels_lookup) ```
Hmm, it seems there is a solution for this in Fluent Bit but it requires building a custom Fluent Bit image. https://github.com/aws-samples/amazon-ecs-firelens-examples/tree/mainline/examples/fluent-bit/filter-multiline-partial-message-mode
I will reopen the issue to get an opinion on this. While a custom built Fluent Bit image can solve the problem, it seems like a lot of work, and...
Point taken, and given that it is a specific use case then writing a custom sink would be a good solution. I am not sure if this is stated explicitly...
Right, that's perfect, thanks.