Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

file logger is disabled / fails to build #2377

Closed
spoonincode opened this issue Apr 13, 2018 · 3 comments
Closed

file logger is disabled / fails to build #2377

spoonincode opened this issue Apr 13, 2018 · 3 comments

Comments

@spoonincode
Copy link
Contributor

EOSIO supports console logging, gelf logging, and... uh.. I thought file logging. But the file logger is disabled and won't compile without some changes. Seems like people would want logs to go to a file.

@brianjohnson5972
Copy link
Contributor

@spoonincode I think everyone is getting around this by just piping to a file. Any objections to closing this? If users want it, I think they will let us know.

@spoonincode
Copy link
Contributor Author

IMO should only consider closing this is if we actually remove the non functional and broken file logging code that is still in the repo.

@ank-everstake
Copy link

I searched a way to write log messages in json to a file, and find a workaround. You can use gelf type appender and point it to localhost. If you run this kind of script you will be able to catch json and write all or part of log line to a file.
Run it like: python3 gelf_to_file.py
It writes to stdout and to a file named as gelf-appender name (in logging json) which is passed in hostname field in log. Modify parsed fields and comment unused print statements. Nodeos uses zlib, gzip is left for history reasons.
Still it would be great to have json logging to a file more native.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants