Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
celllframe-node
Commits
977974f0
Commit
977974f0
authored
5 years ago
by
alexander.lysikov
Browse files
Options
Downloads
Patches
Plain Diff
fixed create log dirs
parent
eeb748b7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!62
fixed create log dirs
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
sources/main.c
+4
-0
4 additions, 0 deletions
sources/main.c
sources/main_node_cli.c
+4
-2
4 additions, 2 deletions
sources/main_node_cli.c
with
8 additions
and
2 deletions
sources/main.c
+
4
−
0
View file @
977974f0
...
@@ -167,6 +167,10 @@ int main( int argc, const char **argv )
...
@@ -167,6 +167,10 @@ int main( int argc, const char **argv )
s_config_dir
=
dap_strdup_printf
(
"%s/etc"
,
g_sys_dir_path
);
s_config_dir
=
dap_strdup_printf
(
"%s/etc"
,
g_sys_dir_path
);
s_log_file_path
=
dap_strdup_printf
(
"%s/var/log/%s.log"
,
g_sys_dir_path
,
dap_get_appname
());
s_log_file_path
=
dap_strdup_printf
(
"%s/var/log/%s.log"
,
g_sys_dir_path
,
dap_get_appname
());
char
*
l_log_dir_path
=
dap_strdup_printf
(
"%s/var/log"
,
g_sys_dir_path
);
dap_mkdir_with_parents
(
l_log_dir_path
);
DAP_DELETE
(
l_log_dir_path
);
if
(
dap_common_init
(
dap_get_appname
(),
s_log_file_path
)
!=
0
)
{
if
(
dap_common_init
(
dap_get_appname
(),
s_log_file_path
)
!=
0
)
{
printf
(
"Fatal Error: Can't init common functions module"
);
printf
(
"Fatal Error: Can't init common functions module"
);
return
-
2
;
return
-
2
;
...
...
This diff is collapsed.
Click to expand it.
sources/main_node_cli.c
+
4
−
2
View file @
977974f0
...
@@ -196,7 +196,7 @@ static char * s_log_file_path= NULL;
...
@@ -196,7 +196,7 @@ static char * s_log_file_path= NULL;
int
main
(
int
argc
,
const
char
*
argv
[])
int
main
(
int
argc
,
const
char
*
argv
[])
#endif
#endif
{
{
dap_set_appname
(
"cellframe-node
-cli
"
);
dap_set_appname
(
"cellframe-node"
);
#ifdef _WIN32
#ifdef _WIN32
s_sys_dir_path
=
dap_strdup_printf
(
"%s/%s"
,
regGetUsrPath
(),
dap_get_appname
());
s_sys_dir_path
=
dap_strdup_printf
(
"%s/%s"
,
regGetUsrPath
(),
dap_get_appname
());
...
@@ -212,7 +212,9 @@ int main(int argc, const char *argv[])
...
@@ -212,7 +212,9 @@ int main(int argc, const char *argv[])
s_config_dir
=
dap_strdup_printf
(
"%s/etc"
,
g_sys_dir_path
);
s_config_dir
=
dap_strdup_printf
(
"%s/etc"
,
g_sys_dir_path
);
s_log_file_path
=
dap_strdup_printf
(
"%s/var/log/%s.log"
,
g_sys_dir_path
,
dap_get_appname
());
s_log_file_path
=
dap_strdup_printf
(
"%s/var/log/%s.log"
,
g_sys_dir_path
,
dap_get_appname
());
dap_mkdir_with_parents
(
s_log_file_path
);
char
*
l_log_dir_path
=
dap_strdup_printf
(
"%s/var/log"
,
g_sys_dir_path
);
dap_mkdir_with_parents
(
l_log_dir_path
);
DAP_DELETE
(
l_log_dir_path
);
if
(
dap_common_init
(
dap_get_appname
(),
s_log_file_path
)
!=
0
)
{
if
(
dap_common_init
(
dap_get_appname
(),
s_log_file_path
)
!=
0
)
{
printf
(
"Fatal Error: Can't init common functions module"
);
printf
(
"Fatal Error: Can't init common functions module"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment