SChernykh / p2pool

Decentralized pool for Monero mining
GNU General Public License v3.0
1.03k stars 124 forks source link

Disable log colors #235

Closed OlMi1 closed 1 year ago

OlMi1 commented 1 year ago

The log is colored with no option known to me to turn it off. Due to the lack of an API / data saving system developers wanting to work with P2Pool need to decode the console. However the color data makes this incredibly difficult, as lines look like this: 2023-02-15 15:22:58.3739 ConsoleCommands event loop started It is really hard to work with this. Is there any way to turn it off?

I am mostly interested in reading the reward amount and times as well as hashrates. Basically everything that's printed when a P2Pool block is found and whats printed when entering "status".

SChernykh commented 1 year ago

Did you read https://github.com/SChernykh/p2pool/blob/master/docs/COMMAND_LINE.MD ? Also, p2pool.log duplicates everything in the console, but without colors.

OlMi1 commented 1 year ago

Did you read https://github.com/SChernykh/p2pool/blob/master/docs/COMMAND_LINE.MD

I did not know this existed and kept searching in the issues... sorry for opening the issue, should have looked through the repo. Thanks for your help!

OlMi1 commented 1 year ago

One more question though, does this data include data about the last reward? Doesn't seem to, however I am unsure if I could calculate this just based on the pool/blocks file.

SChernykh commented 1 year ago

p2pool.log has everything in it - limited to the log level you set, of course.

OlMi1 commented 1 year ago

Would be great to have it in the local stats though. Thanks a lot for the help! The payout notifications are propably included in log level one, right?

SChernykh commented 1 year ago

Payout messages are log level 0.

OlMi1 commented 1 year ago

Thanks a lot! Googling it didn't yield a clear result.