Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
metadata-collect-agent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
metadata-collect-agent
Commits
3a38b054
Commit
3a38b054
authored
Nov 14, 2022
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Switch log file to append mode
Append to the end of the log file instead of overriding it altogether.
parent
a26afc92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/main.cpp
src/main.cpp
+6
-6
src/main.pyx
src/main.pyx
+1
-1
No files found.
src/main.cpp
View file @
3a38b054
...
@@ -6453,7 +6453,7 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
...
@@ -6453,7 +6453,7 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
* node = consume active_node
* node = consume active_node
*
*
* realpath(log_path, resolved_log_path) # <<<<<<<<<<<<<<
* realpath(log_path, resolved_log_path) # <<<<<<<<<<<<<<
* result = fopen(resolved_log_path, '
w
')
* result = fopen(resolved_log_path, '
a
')
* if result is NULL:
* if result is NULL:
*/
*/
(
void
)(
realpath
(
__pyx_v_log_path
,
__pyx_v_resolved_log_path
));
(
void
)(
realpath
(
__pyx_v_log_path
,
__pyx_v_resolved_log_path
));
...
@@ -6461,15 +6461,15 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
...
@@ -6461,15 +6461,15 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
/* "main.pyx":294
/* "main.pyx":294
*
*
* realpath(log_path, resolved_log_path)
* realpath(log_path, resolved_log_path)
* result = fopen(resolved_log_path, '
w
') # <<<<<<<<<<<<<<
* result = fopen(resolved_log_path, '
a
') # <<<<<<<<<<<<<<
* if result is NULL:
* if result is NULL:
* fprintf(stderr, 'Error creating the log file.\n')
* fprintf(stderr, 'Error creating the log file.\n')
*/
*/
__pyx_v_result
=
fopen
(
__pyx_v_resolved_log_path
,
((
char
const
*
)
"
w
"
));
__pyx_v_result
=
fopen
(
__pyx_v_resolved_log_path
,
((
char
const
*
)
"
a
"
));
/* "main.pyx":295
/* "main.pyx":295
* realpath(log_path, resolved_log_path)
* realpath(log_path, resolved_log_path)
* result = fopen(resolved_log_path, '
w
')
* result = fopen(resolved_log_path, '
a
')
* if result is NULL: # <<<<<<<<<<<<<<
* if result is NULL: # <<<<<<<<<<<<<<
* fprintf(stderr, 'Error creating the log file.\n')
* fprintf(stderr, 'Error creating the log file.\n')
* fflush(stderr)
* fflush(stderr)
...
@@ -6478,7 +6478,7 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
...
@@ -6478,7 +6478,7 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
if
(
__pyx_t_8
)
{
if
(
__pyx_t_8
)
{
/* "main.pyx":296
/* "main.pyx":296
* result = fopen(resolved_log_path, '
w
')
* result = fopen(resolved_log_path, '
a
')
* if result is NULL:
* if result is NULL:
* fprintf(stderr, 'Error creating the log file.\n') # <<<<<<<<<<<<<<
* fprintf(stderr, 'Error creating the log file.\n') # <<<<<<<<<<<<<<
* fflush(stderr)
* fflush(stderr)
...
@@ -6507,7 +6507,7 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
...
@@ -6507,7 +6507,7 @@ static int __pyx_f_4main_start(char const *__pyx_v_path_to_scan, char const *__p
/* "main.pyx":295
/* "main.pyx":295
* realpath(log_path, resolved_log_path)
* realpath(log_path, resolved_log_path)
* result = fopen(resolved_log_path, '
w
')
* result = fopen(resolved_log_path, '
a
')
* if result is NULL: # <<<<<<<<<<<<<<
* if result is NULL: # <<<<<<<<<<<<<<
* fprintf(stderr, 'Error creating the log file.\n')
* fprintf(stderr, 'Error creating the log file.\n')
* fflush(stderr)
* fflush(stderr)
...
...
src/main.pyx
View file @
3a38b054
...
@@ -291,7 +291,7 @@ cdef int start(const char *path_to_scan, const char *log_path) nogil:
...
@@ -291,7 +291,7 @@ cdef int start(const char *path_to_scan, const char *log_path) nogil:
node
=
consume
active_node
node
=
consume
active_node
realpath
(
log_path
,
resolved_log_path
)
realpath
(
log_path
,
resolved_log_path
)
result
=
fopen
(
resolved_log_path
,
'
w
'
)
result
=
fopen
(
resolved_log_path
,
'
a
'
)
if
result
is
NULL
:
if
result
is
NULL
:
fprintf
(
stderr
,
'Error creating the log file.
\
n
'
)
fprintf
(
stderr
,
'Error creating the log file.
\
n
'
)
fflush
(
stderr
)
fflush
(
stderr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment