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
14
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
63493b3c
Commit
63493b3c
authored
5 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature-2854' into 'master'
fixed create log dirs See merge request
!62
parents
eeb748b7
977974f0
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 @
63493b3c
...
...
@@ -167,6 +167,10 @@ int main( int argc, const char **argv )
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
());
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
)
{
printf
(
"Fatal Error: Can't init common functions module"
);
return
-
2
;
...
...
This diff is collapsed.
Click to expand it.
sources/main_node_cli.c
+
4
−
2
View file @
63493b3c
...
...
@@ -196,7 +196,7 @@ static char * s_log_file_path= NULL;
int
main
(
int
argc
,
const
char
*
argv
[])
#endif
{
dap_set_appname
(
"cellframe-node
-cli
"
);
dap_set_appname
(
"cellframe-node"
);
#ifdef _WIN32
s_sys_dir_path
=
dap_strdup_printf
(
"%s/%s"
,
regGetUsrPath
(),
dap_get_appname
());
...
...
@@ -212,7 +212,9 @@ int main(int argc, const char *argv[])
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
());
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
)
{
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