From 4ce5190737d1ba6aab05b2d7ed14760854c2b980 Mon Sep 17 00:00:00 2001 From: Anton Date: Thu, 7 Mar 2019 23:11:43 +0400 Subject: pica-node: add log info message on startup with version, pid, protocol version --- PICA_node.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'PICA_node.c') diff --git a/PICA_node.c b/PICA_node.c index 256f999..2261e5b 100644 --- a/PICA_node.c +++ b/PICA_node.c @@ -3557,11 +3557,19 @@ void PICA_node_joinskynet(const char* addrlistfilename, const char *my_addr) int main(int argc, char** argv) { + uint32_t pid; process_cmdline(argc, argv); nodecfg.config_file = (nodecfg.config_file ? nodecfg.config_file : PICA_NODECONFIG_DEF_CONFIG_FILE); +#ifdef WIN32 + pid = GetCurrentProcessId(); +#else + pid = getpid(); +#endif + PICA_info("pica-node v%s started. PID: %u, protocol version: %s", PACKAGE_VERSION, pid, PICA_PROTO_VER_STRING); + if (!PICA_nodeconfig_load(nodecfg.config_file)) { PICA_fatal("Unable to load configuration. Please check if config file %s exists and has correct permissions", nodecfg.config_file); -- cgit v1.2.1