Skip to content

Commit e833b0d

Browse files
authored
fix: windows logging system (#569)
1 parent eb91d77 commit e833b0d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/libltfs/ltfslogging.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,14 @@ int ltfsmsg_internal(bool print_id, int level, char **msg_out, const char *_id,
466466
}
467467

468468
#ifdef mingw_PLATFORM
469-
va_start(argp, _id);
470-
vsyslog2(level, output_buf, argp);
471-
va_end(argp);
469+
if (level <= ltfs_syslog_level
470+
|| level <= ltfs_log_level
471+
|| level == (LTFS_TRACE + 1)) // For "Help" messages
472+
{
473+
va_start(argp, _id);
474+
vsyslog2(level, output_buf, argp);
475+
va_end(argp);
476+
}
472477
#else
473478
va_start(argp, _id);
474479
vfprintf(stderr, output_buf, argp);

0 commit comments

Comments
 (0)