From d35e296d2957206215414ce1fdded741f97957ec Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 19 Oct 2018 15:37:55 +0000 Subject: [PATCH 1/2] Initialize max_object_depth in appender config by setting a default value, for file_appender and gelf_appender. For issue https://github.com/bitshares/bitshares-core/issues/1392 --- include/fc/log/file_appender.hpp | 2 +- include/fc/log/gelf_appender.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fc/log/file_appender.hpp b/include/fc/log/file_appender.hpp index dca0d6aca..6f1fa6f37 100644 --- a/include/fc/log/file_appender.hpp +++ b/include/fc/log/file_appender.hpp @@ -18,7 +18,7 @@ class file_appender : public appender { bool rotate = false; microseconds rotation_interval; microseconds rotation_limit; - uint32_t max_object_depth; + uint32_t max_object_depth = FC_MAX_LOG_OBJECT_DEPTH; }; file_appender( const variant& args ); ~file_appender(); diff --git a/include/fc/log/gelf_appender.hpp b/include/fc/log/gelf_appender.hpp index ba81c3dcd..1df2b2a40 100644 --- a/include/fc/log/gelf_appender.hpp +++ b/include/fc/log/gelf_appender.hpp @@ -15,7 +15,7 @@ namespace fc { 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) - uint32_t max_object_depth; + uint32_t max_object_depth = FC_MAX_LOG_OBJECT_DEPTH; }; gelf_appender(const variant& args); From 9f43902b2cc7a6414ad0b73c572f881b5c8968d6 Mon Sep 17 00:00:00 2001 From: abitmore Date: Fri, 19 Oct 2018 15:48:36 +0000 Subject: [PATCH 2/2] Remove empty lines --- src/log/file_appender.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/log/file_appender.cpp b/src/log/file_appender.cpp index 34a63a89f..270c3dd37 100644 --- a/src/log/file_appender.cpp +++ b/src/log/file_appender.cpp @@ -144,9 +144,7 @@ namespace fc { file_appender::file_appender( const variant& args ) : my( new impl( args.as( FC_MAX_LOG_OBJECT_DEPTH ) ) ) - { - - } + {} file_appender::~file_appender(){}