Bug 829791 - unable to set debug logging on thumbslug
unable to set debug logging on thumbslug
Status: CLOSED CURRENTRELEASE
Product: Subscription Asset Manager
Classification: Red Hat
Component: thumbslug (Show other bugs)
1.0.0
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Adrian Likins
sthirugn@redhat.com
: Triaged
Depends On:
Blocks: sam12-tracker
  Show dependency treegraph
 
Reported: 2012-06-07 10:54 EDT by Chris Duryee
Modified: 2013-06-07 13:25 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-07 13:23:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Chris Duryee 2012-06-07 10:54:53 EDT
Description of problem:

occasionally, it is useful to set debug logging on thumbslug. For example, if a user is getting 403 responses, setting debug logging would give better insight into why that is happening.

However, it is currently only possible to change the logging output by altering the log4j.properties that gets compiled into the jar. There is no way to do this on an installed thumbslug instance.

Instead, thumbslug should read /etc/thumbslug/thumbslug.conf for logging directives, or perhaps /etc/thumbslug/log4j.properties.
Comment 1 Adrian Likins 2012-11-27 15:21:15 EST
commit 451b37f60da18453f251b8132bf10c2e6a91c15c
Merge: c8027cb c97512c
Author: James Bowes <jbowes@redhat.com>
Date:   Thu Nov 8 10:51:03 2012 -0400

    Merge branch 'alikins/829791_logging_config'
    
    Conflicts:
        src/main/java/org/candlepin/thumbslug/Main.java
Comment 2 Adrian Likins 2013-02-11 16:23:14 EST
sample line to add to /etc/thumbslug/thumbslug.conf:

log4j.logger.org.candlepin.thumbslug=DEBUG

restarting thumbslug should show some DEBUG error messages with
turned on
Comment 3 sthirugn@redhat.com 2013-02-11 16:58:32 EST
Verified in the below version:
* candlepin-0.7.23-1.el6_3.noarch
* candlepin-tomcat6-0.7.23-1.el6_3.noarch
* elasticsearch-0.19.9-5.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.2.1-1h.el6_3.noarch
* katello-cli-1.2.1-12h.el6_3.noarch
* katello-cli-common-1.2.1-12h.el6_3.noarch
* katello-common-1.2.1-15h.el6_3.noarch
* katello-configure-1.2.3-3h.el6_3.noarch
* katello-glue-candlepin-1.2.1-15h.el6_3.noarch
* katello-headpin-1.2.1-15h.el6_3.noarch
* katello-headpin-all-1.2.1-15h.el6_3.noarch
* katello-selinux-1.2.1-2h.el6_3.noarch
* thumbslug-0.0.28-1.el6_3.noarch
* thumbslug-selinux-0.0.28-1.el6_3.noarch

Steps:
# service thumbslug stop
Stopping thumbslug: [  OK  ]

# service thumbslug status
thumbslug is stopped

**Added log4j.logger.org.candlepin.thumbslug=DEBUG flag in /etc/thumbslug/thumbslug.conf**

# service thumbslug start
Starting thumbslug: Feb 11 16:28:01 [main] DEBUG org.candlepin.thumbslug.Main - Daemonizing..
Feb 11 16:28:01 [main] DEBUG org.candlepin.thumbslug.Main - Daemonized, exiting
Feb 11 16:28:01 [main] WARN  org.candlepin.thumbslug.Main - Shutting down...
[  OK  ]

**Note that the DEBUG message appears**

# service thumbslug status
thumbslug (pid  23084) is running...

**Removed log4j.logger.org.candlepin.thumbslug=DEBUG flag in /etc/thumbslug/thumbslug.conf**

# service thumbslug stop
Stopping thumbslug: [  OK  ]

# service thumbslug status
thumbslug is stopped

# service thumbslug start
Starting thumbslug: Feb 11 16:29:31 [main] WARN  org.candlepin.thumbslug.Main - Shutting down...
[  OK  ]

**Added log4j.logger.org.candlepin.thumbslug=INFO flag in /etc/thumbslug/thumbslug.conf**

# service thumbslug stop
Stopping thumbslug: [  OK  ]

# service thumbslug status
thumbslug is stopped

# service thumbslug start
Starting thumbslug: Feb 11 16:34:41 [main] WARN  org.candlepin.thumbslug.Main - Shutting down...
[  OK  ]

**looks like there are no INFO flagged messages while starting Thumbslug**
Comment 4 sthirugn@redhat.com 2013-02-12 12:11:19 EST
Verified as per my comment 3 above
Comment 5 Bryan Kearney 2013-06-07 13:23:23 EDT
Closing out verified bugs from 1.2. Somehow the errata tool missed them.
Comment 6 Bryan Kearney 2013-06-07 13:25:19 EDT
Closing out verified bugs from 1.2. Somehow the errata tool missed them.

Note You need to log in before you can comment on or make changes to this bug.