dfuse-eosio
dfuse-eosio copied to clipboard
Better node manager split 'nodeos' log lines when error occurs
I had a case where I had a syntax error in the config.ini
file, the output format when logging through zap is:
2021-01-15T15:56:59.717-0500 (mindreader) operator ready to receive commands (operator/operator.go:144)
2021-01-15T15:56:59.753-0500 (mindreader) error 2021-01-15T20:56:59.752 thread-0 main.cpp:163 main ] ../libraries/appbase/application.cpp(298): Throw in function bool appbase::application::initialize_impl(int, char **, vector<appbase::abstract_plugin *>) (log_plugin/to_zap_log_plugin.go:119)
2021-01-15T15:56:59.753-0500 (mindreader) Dynamic exception type: boost::wrapexcept<std::runtime_error> (log_plugin/to_zap_log_plugin.go:119)
2021-01-15T15:56:59.753-0500 (mindreader) std::exception::what: Unknown option '; p2p-peer-address' inside the config file /Users/maoueh/work/dfuse/playground-eosio-dfuse-blocks/mindreader/config.ini (log_plugin/to_zap_log_plugin.go:119)
2021-01-15T15:56:59.753-0500 (mindreader) (log_plugin/to_zap_log_plugin.go:119)
This was a pain to notice as en error. It would be cool to output the last N logs lines as-is when nodeos dies completely.