Skip to content
Snippets Groups Projects
Commit 35ca19c3 authored by Alexandr Mruchok's avatar Alexandr Mruchok Committed by dmitriy.gerasimov
Browse files

feature 2648

parent b0859e8f
No related branches found
No related tags found
No related merge requests found
......@@ -5,16 +5,10 @@
extern "C" {
#endif
#ifdef __ANDROID__
#define LOG_PATH
int cellframe_node_Main(int argc, const char **argv);
int cellframe_node__cli_Main(int argc, const char *argv[]);
int cellframe_node_tool_Main(int argc, const char **argv);
#endif
#ifdef __cplusplus
}
#endif
......
#pragma once
#define NODE_NETNAME "cellframe"
#define DAP_APP_NAME NODE_NETNAME "-node"
//#ifdef _WIN32
// #define SYSTEM_PREFIX "%USERPROFILE%/opt/"DAP_APP_NAME
//#else
#ifdef __ANDROID__
#define ANDROID_STORAGE_PATH "/storage/emulated/0"
#define SYSTEM_PREFIX ANDROID_STORAGE_PATH "/opt/" DAP_APP_NAME
#else
#define SYSTEM_PREFIX "/opt/" DAP_APP_NAME
#endif
// #define SYSTEM_PREFIX "opt/"DAP_APP_NAME
//#endif
......@@ -13,6 +20,7 @@
#define SYSTEM_CONFIGS_DIR SYSTEM_PREFIX"/etc"
#define LOCAL_CONFIGS_DIR LOCAL_PREFIX"/etc"
#define SYSTEM_LOGS_DIR SYSTEM_PREFIX"/var/log"
#define SYSTEM_LOGS_PATH SYSTEM_LOGS_DIR "/" DAP_APP_NAME ".log"
#define SYSTEM_CONFIG_GLOBAL_FILENAME SYSTEM_PREFIX"/etc/" DAP_APP_NAME".cfg"
#define LOCAL_CONFIG_GLOBAL LOCAL_PREFIX"/etc/" DAP_APP_NAME".cfg"
......
......@@ -157,7 +157,8 @@ int main( int argc, const char **argv )
memcpy(l_log_file_path, s_sys_dir_path, l_sys_dir_path_len);
memcpy(s_pid_file_path, s_sys_dir_path, l_sys_dir_path_len);
#endif
dap_snprintf( l_log_file_path + l_sys_dir_path_len , sizeof ( l_log_file_path ), "%s/%s.log", SYSTEM_LOGS_DIR , DAP_APP_NAME );
dap_snprintf( l_log_file_path + l_sys_dir_path_len , sizeof ( l_log_file_path ), "%s", SYSTEM_LOGS_PATH );
dap_mkdir_with_parents( SYSTEM_LOGS_DIR );
if ( dap_common_init( DAP_APP_NAME, l_log_file_path ) != 0 ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment