Skip to content

Commit

Permalink
Enable logger in proxy lib
Browse files Browse the repository at this point in the history
fixes: #605

Signed-off-by: Łukasz Plewa <[email protected]>
  • Loading branch information
lplewa committed Jul 9, 2024
1 parent dca2157 commit 6469e4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/proxy_lib/proxy_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ static __TLS int was_called_from_umfPool = 0;
/*****************************************************************************/

void proxy_lib_create_common(void) {
util_log_init();
umf_os_memory_provider_params_t os_params =
umfOsMemoryProviderParamsDefault();
umf_result_t umf_result;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/utils_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ void util_log_init(void) {

memcpy(file, arg, len);
file[len] = '\0';
loggerConfig.output = fopen(file, "w+");
loggerConfig.output = fopen(file, "a");
if (!loggerConfig.output) {
loggerConfig.output = stderr;
LOG_ERR("Cannot open output file %s - logging disabled", file);
LOG_PERR("Cannot open output file %s - logging disabled", file);
loggerConfig.output = NULL;
return;
}
Expand Down

0 comments on commit 6469e4e

Please sign in to comment.