Hello,
For each line written to the console there is a string “source=console” appended at the end.
Ex:
INFO[0001] Calling GET /document/9072_1 (tag = document)... source=console
INFO[0001] Response for GET /document/9072_1 : 200 (57 ms) source=console
Is there a way to remove it ?
I found it a bit annoying when reading the console logs (I’m often interested by an info at the end of the line - like the request duration, having this “source=console” appended makes it harder to quickly parse the logs with my eyes) 
Hi @olivier.masseau,
There currently is no way to remove it at this time.
This likely will have to wait for the log system refactoring mentioned in this comment. As mentioned there, this isn’t really a priority so … unlikely to be started soon.
You should probably open an issue though. This will both help with tracking this and will mean that others might voice their desire for such a change as well - potentially increasing it’s priority.
The only workaround is to use --console-output
and output to a file. Which might be a good idea if you are looking at a lot of logs
. I guess in the same vein you can output it to loki and query it back.
Hope this helps you!
You can also try playing with the --log-format
option. --log-format=raw
will remove the source=console
decoration, but it will also remove the log levels. --log-format=json
will add even more details, but you can potentially pipe them and use something like jq to format them however you want
1 Like