This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push:
new 31e404a Add support for a new log level called Trace, lower-level
than Debug.
31e404a is described below
commit 31e404a415f676dccf32a983738d50f252903de9
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Nov 5 09:10:03 2021 -0400
Add support for a new log level called Trace, lower-level than Debug.
---
src/native/windows/src/log.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/native/windows/src/log.c b/src/native/windows/src/log.c
index ddafe90..f5e6d2d 100644
--- a/src/native/windows/src/log.c
+++ b/src/native/windows/src/log.c
@@ -320,7 +320,7 @@ apxLogWrite(
if (dwLevel < lf->dwLogLevel)
return 0;
APX_LOGENTER();
- if (f && (lf->dwLogLevel == APXLOG_LEVEL_DEBUG || dwLevel ==
APXLOG_LEVEL_ERROR)) {
+ if (f && (lf->dwLogLevel <= APXLOG_LEVEL_DEBUG || dwLevel ==
APXLOG_LEVEL_ERROR)) {
f = (szFile + lstrlenA(szFile) - 1);
while(f != szFile && '\\' != *f && '/' != *f)
f--;
@@ -377,7 +377,7 @@ apxLogWrite(
}
WriteFile(lf->hFile, _log_level[dwLevel],
lstrlenA(_log_level[dwLevel]), &wr, NULL);
- if (f && lf->dwLogLevel == APXLOG_LEVEL_DEBUG) {
+ if (f && lf->dwLogLevel <= APXLOG_LEVEL_DEBUG) {
wsprintfA(sb, "(%10s:%-4d) ", f, dwLine);
WriteFile(lf->hFile, sb, lstrlenA(sb), &wr, NULL);
}