4

I've been mining XMR for a little while, and just decided to set up a private wallet and a node on my mini-PC at home.

The first thing I noticed is that the daemon's log output is very verbose. Is there any way to for instance remove the reference to source file and line? I.e. this part of the output?

src/cryptonote_protocol/cryptonote_protocol_handler.inl:1004

I tried to play with --log-level, but didn't see any improvement. I found no other option in --help that seemed relevant.

The reason I want to get rid of it, aside from readability in the terminal window, is that I also run a small webserver on the same box which displays excerpts from logs of various services. To do that effectively, smaller logs are preferable, and the extra information roughly doubles the log size currently.

Edited the log entry copy/paste to clarify what I want to get rid of.

2 Answers 2

4

You can set the MONERO_LOG_FORMAT environment variable to include whatever data you want to be output. The default is:

%datetime{%Y-%M-%d %H:%m:%s.%g}\t%thread\t%level\t%logger\t%loc\t%msg

The available variables are in the easylogging++ documentation, in the "Loging format specifiers" section:

https://github.com/muflihun/easyloggingpp

1
  • Perfect! Thanks. I was looking at the source code for easylogging++ in the monero code, but didn't think to check their documentation.
    – Jadzia626
    May 25, 2017 at 21:03
1

the daemon automatically runs with log level 0.

You can remove all log categories with this while its running

monerod set_log ""

or if you are able to access the daemon while its running (its not actually daemonized), then type set_log none into the daemon.

Or you can launch it with --log-level ""

1
  • 1
    Thanks for your response, but as I said I know where to set log levels. What I am asking is if there is a setting that removes the source file reference, which clutters the output and bloats my log files.
    – Jadzia626
    May 24, 2017 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.