Disabling colourised output from cardano-node? (colours, colors, colorised, colorized)

I’m running cardano-node as a systemd service.

Colour escape-codes are cluttering up my logs

How can I disable them? I dont want colours. I dont need colours.

Thanks for any suggestions.

I don’t know what you are doing to create colours. My systemd journals have no colours.

@boli99 Just letting you know that yes I know exactly what you’re talking about… with the escape codes that generate colours in UNIX terminals being appended to the text-mode log files and systemd log messages… but that no there does not seem to be a way to suppress them.

I actually adapted to having those colours displayed on a wide screen since monitoring my nodes this way helps with a visual impairment that I have. But sometimes (e.g. when opening the node logfile in text editor vi) the escape codes are a pain in the neck.

Looking at ways to filter these our or suppress them in vi or command line scripts for 2-3 years now, I have confirmed that there is no easy standard way of doing it. I’m also unaware of any option to config.json in cardano-node that suppresses the colour escape sequences either. :face_with_monocle:

1 Like

thanks for your input - ive been continuing to experiment, and I had begun wondering if somehow it was related to not using a scribe of type journalSK (in mainnet-config.json)

…so I changed scribe to type journalSK, and now I’m getting absolutely nothing in the journal log other than

Feb 25 04:18:41 xxxxxx systemd[1]: Started Cardano Node Daemon.
Feb 25 04:18:44 xxxxxx cardano-node[1005914]: Listening on http://127.0.0.1:12798

although the node /is/ running, and I’m pulling prometheus metrics just fine for my monitoring.

So… I got my wish of the process journal being calmer (!) but I’m wondering if those logs are now just being recorded somewhere else that I havent found yet

1 Like