11#include <boost/exception/diagnostic_information.hpp>
24 elog(
"Error reloading logging.json");
29 }
catch (
const boost::exception& e) {
30 elog(
"${e}", (
"e", boost::diagnostic_information(e)));
31 }
catch (
const std::exception& e) {
41 ilog(
"Received HUP. Reloading logging configuration from ${p}.", (
"p", config_path.string()));
43 ilog(
"Received HUP. No log config found at ${p}, setting to default.", (
"p", config_path.string()));
62 struct passwd* pwd = getpwuid(getuid());
67 home = getenv(
"HOME");
83 .default_unix_socket_path = kiod::config::key_store_executable_name +
".sock",
84 .default_http_port = 0
87 if(!
app().initialize<wallet_plugin, wallet_api_plugin, http_plugin>(argc,
argv)) {
89 if (opts.count(
"help") || opts.count(
"version") || opts.count(
"full-version") ||
90 opts.count(
"print-default-config")) {
101 }
catch (
const boost::exception& e) {
102 elog(
"${e}", (
"e",boost::diagnostic_information(e)));
103 }
catch (
const std::exception& e) {
106 elog(
"unknown exception");
const bpo::variables_map & get_options() const
void set_version_string(std::string v)
User provided version string for version_string() which overrides git describe value.
abstract_plugin & get_plugin(const string &name) const
void set_default_config_dir(const bfs::path &config_dir="etc")
Set default config directory.
void set_sighup_callback(std::function< void()> callback)
Set function pointer invoked on receipt of SIGHUP.
bfs::path get_logging_conf() const
Get logging configuration path.
void set_full_version_string(std::string v)
User provided full version string for full_version_string()
void set_default_data_dir(const bfs::path &data_dir="data-dir")
Set default data directory.
Used to generate a useful error report when an exception is thrown.
std::string to_detail_string(log_level ll=log_level::all) const
const char * what() const noexcept override
An order-preserving dictionary of variants.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
void add_handler(const string &url, const url_handler &, int priority=appbase::priority::medium_low)
static void set_defaults(const http_plugin_defaults config)
Defines exception's used by fc.
bool exists(const path &p)
void configure_logging(const fc::path &log_config)
const std::string & version_client()
< Grab the basic version information of the client; example: v1.8.0-rc1
const std::string & version_full()
std::function< void(int, fc::variant)> url_response_callback
A callback function provided to a URL handler to allow it to specify the HTTP response code and body.
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
void initialize_logging()
void logging_conf_handler()
bfs::path determine_home_directory()
static void initialize_appenders(boost::asio::io_service &ios)