Skip to content

Commit

Permalink
Merge pull request #8389 from naveenpaul1/unwantted_logs
Browse files Browse the repository at this point in the history
NSFS | NOOBAA_LOG_LEVEL is not working as expected
  • Loading branch information
naveenpaul1 committed Sep 24, 2024
2 parents 91c3e00 + 65db545 commit 6d5783b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/native/fs/fs_napi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2176,7 +2176,7 @@ set_debug_level(const Napi::CallbackInfo& info)
{
int level = info[0].As<Napi::Number>();
DBG_SET_LEVEL(level);
LOG("FS::set_debug_level " << level);
DBG1("FS::set_debug_level " << level);
return info.Env().Undefined();
}

Expand All @@ -2187,7 +2187,7 @@ set_log_config(const Napi::CallbackInfo& info)
bool syslog_enabled = info[1].As<Napi::Boolean>();
LOG_TO_STDERR_ENABLED = stderr_enabled;
LOG_TO_SYSLOG_ENABLED = syslog_enabled;
LOG("FS::set_log_config: " << DVAL(LOG_TO_STDERR_ENABLED) << DVAL(LOG_TO_SYSLOG_ENABLED));
DBG1("FS::set_log_config: " << DVAL(LOG_TO_STDERR_ENABLED) << DVAL(LOG_TO_SYSLOG_ENABLED));
return info.Env().Undefined();
}

Expand Down
2 changes: 1 addition & 1 deletion src/native/util/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extern bool LOG_TO_SYSLOG_ENABLED;
do { \
const char* log_msg = x.c_str(); \
int facility = LOG_LOCAL0; \
int priority = 0; \
int priority = 5; \
::syslog(priority | facility, "%s", log_msg); \
} while (0)

Expand Down
2 changes: 1 addition & 1 deletion src/sdk/nb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ interface NativeFS {

dio_buffer_alloc(size: number): Buffer;
set_debug_level(level: number);
set_log_config(stderr_enabled: boolean, syslog_enabled: boolean,);
set_log_config(stderr_enabled: boolean, syslog_enabled: boolean);

S_IFMT: number;
S_IFDIR: number;
Expand Down

0 comments on commit 6d5783b

Please sign in to comment.