Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 829791

Summary: unable to set debug logging on thumbslug
Product: [Retired] Subscription Asset Manager Reporter: Chris Duryee <cduryee>
Component: thumbslugAssignee: Adrian Likins <alikins>
Status: CLOSED CURRENTRELEASE QA Contact: sthirugn <sthirugn>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: alikins, bkearney, esammons, sthirugn
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-07 17:23:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 816564    

Description Chris Duryee 2012-06-07 14:54:53 UTC
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 20:21:15 UTC
commit 451b37f60da18453f251b8132bf10c2e6a91c15c
Merge: c8027cb c97512c
Author: James Bowes <jbowes>
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 21:23:14 UTC
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 21:58:32 UTC
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 17:11:19 UTC
Verified as per my comment 3 above

Comment 5 Bryan Kearney 2013-06-07 17:23:23 UTC
Closing out verified bugs from 1.2. Somehow the errata tool missed them.

Comment 6 Bryan Kearney 2013-06-07 17:25:19 UTC
Closing out verified bugs from 1.2. Somehow the errata tool missed them.