diff --git a/CMakeLists.txt b/CMakeLists.txt index 378521dc45..23d5376dbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -764,6 +764,7 @@ endif() if(NANO_GUI OR RAIBLOCKS_GUI) install(FILES ${PROJECT_BINARY_DIR}/config-node.toml.sample DESTINATION .) install(FILES ${PROJECT_BINARY_DIR}/config-rpc.toml.sample DESTINATION .) + install(FILES ${PROJECT_BINARY_DIR}/config-log.toml.sample DESTINATION .) if(WIN32) set(PLATFORM_QT_PACKAGES WinExtras) else() diff --git a/nano/nano_node/CMakeLists.txt b/nano/nano_node/CMakeLists.txt index 5da26671ee..48d42d3586 100644 --- a/nano/nano_node/CMakeLists.txt +++ b/nano/nano_node/CMakeLists.txt @@ -18,7 +18,9 @@ add_custom_command( COMMAND nano_node --generate_config node > ${PROJECT_BINARY_DIR}/config-node.toml.sample COMMAND nano_node --generate_config rpc > - ${PROJECT_BINARY_DIR}/config-rpc.toml.sample) + ${PROJECT_BINARY_DIR}/config-rpc.toml.sample + COMMAND nano_node --generate_config log > + ${PROJECT_BINARY_DIR}/config-log.toml.sample) if((NANO_GUI OR RAIBLOCKS_GUI) AND NOT APPLE) if(WIN32) diff --git a/nano/node/cli.cpp b/nano/node/cli.cpp index 9ec0539b4c..2636f5a144 100644 --- a/nano/node/cli.cpp +++ b/nano/node/cli.cpp @@ -58,7 +58,7 @@ void nano::add_node_options (boost::program_options::options_description & descr ("rebuild_database", "Rebuild LMDB database with vacuum for best compaction") ("migrate_database_lmdb_to_rocksdb", "Migrates LMDB database to RocksDB") ("diagnostics", "Run internal diagnostics") - ("generate_config", boost::program_options::value (), "Write configuration to stdout, populated with defaults suitable for this system. Pass the configuration type node, rpc or tls. See also use_defaults.") + ("generate_config", boost::program_options::value (), "Write configuration to stdout, populated with defaults suitable for this system. Pass the configuration type node, rpc or log. See also use_defaults.") ("key_create", "Generates a adhoc random keypair and prints it to stdout") ("key_expand", "Derive public key and account number from ") ("wallet_add_adhoc", "Insert in to ") @@ -671,6 +671,12 @@ std::error_code nano::handle_node_options (boost::program_options::variables_map nano::rpc_config config{ nano::dev::network_params.network }; config.serialize_toml (toml); } + else if (type == "log") + { + valid_type = true; + nano::log_config config{ nano::log_config::daemon_default () }; + config.serialize_toml (toml); + } else if (type == "tls") { valid_type = true;