Disable ansi codes for logs #764
Replies: 3 comments 2 replies
-
Mine look like #011 and #033[2m etc... So in the mean time I filter them out with something like: sed -i 's/#011//g' $log or probably even with 1 line of code. note: this (-i) changes the logfile itself! |
Beta Was this translation helpful? Give feedback.
-
At now I use ugly hack:
and bash-script for output filtering: #!/usr/bin/env bash
cd /opt/meilisearch
exec 1> >(stdbuf -oL sed -u -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g")
exec 2>&1
meilisearch --config-file-path="./config.toml" Far from perfect but its working :) P.S. In an ideal world, meilisearch would have a setting in its config file to disable color output. |
Beta Was this translation helpful? Give feedback.
-
You can use the |
Beta Was this translation helpful? Give feedback.
-
My system use classic text logs. So ansi codes in logs are problem for me.
Now my logs look like this:
Can I choose clear text log format without any fancy things?
Beta Was this translation helpful? Give feedback.
All reactions