We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd8794b commit 1869470Copy full SHA for 1869470
src/utils/utils_log.c
@@ -241,7 +241,7 @@ void util_log_init(void) {
241
242
memcpy(file, arg, len);
243
file[len] = '\0';
244
- loggerConfig.output = fopen(file, "w");
+ loggerConfig.output = fopen(file, "w+");
245
if (!loggerConfig.output) {
246
loggerConfig.output = stderr;
247
LOG_ERR("Cannot open output file %s - logging disabled", file);
test/utils/utils_log.cpp
@@ -14,7 +14,7 @@ int fopen_count = 0;
14
FILE *mock_fopen(const char *filename, const char *mode) {
15
fopen_count++;
16
EXPECT_STREQ(filename, expected_filename.c_str());
17
- EXPECT_STREQ(mode, "w");
+ EXPECT_STREQ(mode, "w+");
18
return MOCK_FILE_PTR;
19
}
20
0 commit comments