commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DAEMON-391) Log level set by Tomcat-GUI under Windows not recognized.
Date Thu, 20 Sep 2018 02:25:00 GMT

    [ https://issues.apache.org/jira/browse/DAEMON-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16621421#comment-16621421
] 

Gary Gregory commented on DAEMON-391:
-------------------------------------

So we need someone to test this...

> Log level set by Tomcat-GUI under Windows not recognized.
> ---------------------------------------------------------
>
>                 Key: DAEMON-391
>                 URL: https://issues.apache.org/jira/browse/DAEMON-391
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.1.0
>            Reporter: Thorsten Schöning
>            Priority: Minor
>         Attachments: LOGL_WARN.patch
>
>
> I'm using Tomcat7 which provides a GUI to configure various aspects of the Windows-service,
like log level and such, which seem to be managed by "prunmgr" of your project in the end.
If I set the log level to "Warning" using that GUI, I still get logged lines using "info"
in the default log file:
> {QUOTE}[2018-09-10 09:45:47] [info]  [12744] Commons Daemon procrun (1.1.0.0 64-bit)
started{QUOTE}
> I used ProcMon to check that the correct settings were read from the registry, which
was the case:
> {QUOTE}09:45:47,6441892 Tomcat7.exe 8764 RegQueryValue HKLM\SOFTWARE\WOW6432Node\Apache
Software Foundation\Procrun 2.0\Tomcat7\Parameters\Log\Level SUCCESS Type: REG_SZ, Length:
16, Data: Warning{QUOTE}
> Your docs mention the following values for the log level:
> {QUOTE}Defines the logging level and can be either Error, Info, Warn or
> Debug. (Case insensitive).{QUOTE}
> https://commons.apache.org/proper/commons-daemon/procrun.html
> So I've tested using "--LogLevel=WARN" at the command line and changed the value in the
registry from "Warning" to "Warn" as well. Both succeeded, I don't get any log messages anymore.
But the GUI is unable to recognize the value "Warn" now and instead falls back to "Debug",
so there's most likely some naming mismatch.
> I think the underlying problem is that "prunmgr" uses the phrase "Warning", while the
logging logic is mapping "warn" only instead:
> {QUOTE}#define LOGL_WARN           L"Warning"{QUOTE}
> https://github.com/apache/commons-daemon/blob/trunk/src/native/windows/apps/prunmgr/prunmgr.c#L49
> {QUOTE}else if (!lstrcmpiW(szLevel, L"warn")){QUOTE}
> https://github.com/apache/commons-daemon/blob/trunk/src/native/windows/src/log.c#L276
> I guess "Warning" could simply be changed to "Warn" to make things work and am attaching
a patch doing so. This is untested, though!
> http://mail-archives.apache.org/mod_mbox/commons-dev/201809.mbox/<161449685.20180910102700%40am-soft.de>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message