search for: vupslog

Displaying 6 results from an estimated 6 matches for "vupslog".

Did you mean: upslog
2023 Jan 15
1
logging strategy
...matches that, 1 to 5 where 5 is if you want to see every IO byte. > Regarding syslog/stdout/stderr, the upsdebugx*() methods are defined here > and near: > https://github.com/networkupstools/nut/blob/ad70749f243527e774c3f03a08228430143396e9/common/common.c#L1205 > and end up calling vupslog() at which can report to stderr (not stdout) > and/or syslog, based on settings - see around > https://github.com/networkupstools/nut/blob/ad70749f243527e774c3f03a08228430143396e9/common/common.c#L1011. > The UPSLOG_STDERR bit is set by default, but cleared in the background() > method,...
2023 Jan 15
1
logging strategy
...r more). De-facto verbosities fizzle out at 6, but generally it is an int value, so... Regarding syslog/stdout/stderr, the upsdebugx*() methods are defined here and near: https://github.com/networkupstools/nut/blob/ad70749f243527e774c3f03a08228430143396e9/common/common.c#L1205 and end up calling vupslog() at which can report to stderr (not stdout) and/or syslog, based on settings - see around https://github.com/networkupstools/nut/blob/ad70749f243527e774c3f03a08228430143396e9/common/common.c#L1011. The UPSLOG_STDERR bit is set by default, but cleared in the background() method, along with raising...
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...;r"); + if (!fp) { + ndl = 0; /* Ignore errors */ + } else { + if (fscanf(fp, "%d", &ndl) != 1) { + ndl = 0; /* Ignore errors */ + } + fclose(fp); + } + if (nut_debug_level < level && ndl < level) { + return; + } va_start(va, fmt); vupslog(LOG_DEBUG, fmt, va, 1); va_end(va); @@ -419,10 +434,25 @@ void upsdebug_with_errno(int level, cons void upsdebugx(int level, const char *fmt, ...) { va_list va; - - if (nut_debug_level < level) - return; + /* Sysadmin may use "echo n > /etc/ups/NUT_DEBUG_LEVEL" to set de...
2023 Jan 15
1
logging strategy
I am looking at bestfortress and trying to figure out and fix some things, which is causing me to try to improve logging first. A few questions: 0) The developer guide doesn't seem to address any of this, or did I miss it? 1) It seems upsdebugx prints to stdout instead of syslog if in foreground. That's great but I didn't figure it out from docs. 2) I didn't find a plan for
2016 Apr 17
2
NUT Windows port sources review
...is going on and what is wrong: it is quite hard to increase logging level and it is uncomfortable to work with Windows Event Log. I think that logging architecture should be improved. Linux version contains several logging function like upslogx, upslog_with_errno, upsdebugx, etc. All of them call vupslog function inside. This function can write messages into STDERR stream and send them into syslog (writing to a log file is not required because Linux has syslogd, logrotation, etc.). Windows port contains the same function. It can write messages into STDERR stream too, but as there is no native sysl...
2016 Apr 25
0
NUT Windows port sources review
...ome cleanup, and I wouldn't want someone to have to do this twice. I personally like the idea of more descriptive log levels, but have not had a chance to map this out myself. > Linux version contains several logging function like upslogx, upslog_with_errno, upsdebugx, etc. All of them call vupslog function inside. This function can write messages into STDERR stream and send them into syslog (writing to a log file is not required because Linux has syslogd, logrotation, etc.). > > Windows port contains the same function. It can write messages into STDERR stream too, but as there is no na...