From issues-return-69733-archive-asf-public=cust-asf.ponee.io@commons.apache.org Thu Sep 20 04:25:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 06E16180677 for ; Thu, 20 Sep 2018 04:25:05 +0200 (CEST) Received: (qmail 80546 invoked by uid 500); 20 Sep 2018 02:25:05 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 80535 invoked by uid 99); 20 Sep 2018 02:25:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Sep 2018 02:25:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 6F3AFC05CC for ; Thu, 20 Sep 2018 02:25:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id sIq1GOe01K5D for ; Thu, 20 Sep 2018 02:25:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 689045F591 for ; Thu, 20 Sep 2018 02:25:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 48E87E2632 for ; Thu, 20 Sep 2018 02:25:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 606F523FAE for ; Thu, 20 Sep 2018 02:25:00 +0000 (UTC) Date: Thu, 20 Sep 2018 02:25:00 +0000 (UTC) From: "Gary Gregory (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DAEMON-391) Log level set by Tomcat-GUI under Windows not recognized. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DAEMON-391?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1662= 1421#comment-16621421 ]=20 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=C3=B6ning > Priority: Minor > Attachments: LOGL_WARN.patch > > > I'm using Tomcat7 which provides a GUI to configure various aspects of th= e Windows-service, like log level and such, which seem to be managed by "pr= unmgr" of your project in the end. If I set the log level to "Warning" usin= g 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 regi= stry, which was the case: > {QUOTE}09:45:47,6441892 Tomcat7.exe 8764 RegQueryValue HKLM\SOFTWARE\WOW6= 432Node\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=3DWARN" 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 t= he value "Warn" now and instead falls back to "Debug", so there's most like= ly 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/ap= ps/prunmgr/prunmgr.c#L49 > {QUOTE}else if (!lstrcmpiW(szLevel, L"warn")){QUOTE} > https://github.com/apache/commons-daemon/blob/trunk/src/native/windows/sr= c/log.c#L276 > I guess "Warning" could simply be changed to "Warn" to make things work a= nd am attaching a patch doing so. This is untested, though! > http://mail-archives.apache.org/mod_mbox/commons-dev/201809.mbox/<1614496= 85.20180910102700%40am-soft.de> -- This message was sent by Atlassian JIRA (v7.6.3#76005)