Hi, I’ve noticed that in the last version of melta...
# troubleshooting
o
Hi, I’ve noticed that in the last version of meltano the logs are coming very strange and it is a new behavior. I get the following
Copy code
[2022-02-20, 19:22:29 UTC] {docker.py:276} INFO - [2m2022-02-20T19:22:29.777374Z[0m [[32m[1minfo     [0m] [1mFound state from 2022-02-20 16:20:25.700178.[0m
Can someone help me resolve it and make it back to the normal format?
a
@or_barda - Thanks for reporting. On first glance, this appears to be a bug. If you are able to log an issue with a full log (minus any confidential or sensitive info), this could help us to reproduce the issue and hopefully will lead to identifying a root cause. https://gitlab.com/meltano/meltano/-/issues
o
@aaronsteers - Hi, of course. Just to clarify I think it is related to the new logging you added in v1.89 because when I tested it with v1.82 it was fine. I think it is ok to add such change but the default behavior should be backward compatible
p
@or_barda there is a sample config here that should help you: https://docs.meltano.com/reference/settings#clilog_config I used that template to switch to JSON logging, which plays nicer with Datadog. But you can also swap back in the console formatter with
colors: False
and that should get rid of (some of?) the control characters. I do think this is a bug though - colors should be either opt-in or only if you have a TTY attached, rather than always on. It does seem like structlog is supposed to detect TTY if you don’t say
force_colors
, but this isn’t happening for me either. Maybe the problem is that the
dev.ConsoleRenderer
is being used by default, which is in the structlog development tools package, and it’s making some
o
@paul_tiplady, Thanks for the response. I agree that using the logging configuration file will fix it, but to be backward compatible you need to provide the old structure by default and only then if someone specifies the logging conf then it will use it. Currently, for me I will need to change my deployments to add this configuration file as well instead of getting the same as before and if I want to add something to the logging configuration I can add the configuration file.