nodeos 输出log方式
bool configure_logging( const logging_config& cfg )
{
try {
static bool reg_console_appender = appender::register_appender<console_appender>( "console" );
static bool reg_gelf_appender = appender::register_appender<gelf_appender>( "gelf" );
get_logger_map().clear();
get_appender_map().clear();
支持输出到 console 和 gelf 两种方式
namespace fc
{
// Log appender that sends log messages in JSON format over UDP
// https://www.graylog2.org/resources/gelf/specification
class gelf_appender final : public appender
{
public:
struct config
{
string endpoint = "127.0.0.1:12201";
string host = "fc"; // the name of the host, source or application that sent this message (just passed through to GELF server)
};