Skip to content

options/posix: do not print warnings for ignored syslog messages #1386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions options/posix/generic/syslog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,10 @@ void syslog(int priority, const char *format, ...) {
}

void vsyslog(int priority, const char *message, va_list ap) {
int cs;
if(!(log_mask & LOG_MASK(priority & 7)) || (priority & ~0x3ff)) {
mlibc::infoLogger() << "\e[31mmlibc: syslog: log_mask or priority out of range, not printing anything\e[39m" << frg::endlog;
if (!(log_mask & LOG_MASK(priority & 7)) || (priority & ~0x3ff))
return;
}

int cs;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
frg::unique_lock<FutexLock> lock(__syslog_lock);
_vsyslog(priority, message, ap);
Expand Down