Skip to content

[WIP] configure loglevel for salt and python#619

Open
mcalmer wants to merge 1 commit into
uyuni-project:masterfrom
mcalmer:configure-logging
Open

[WIP] configure loglevel for salt and python#619
mcalmer wants to merge 1 commit into
uyuni-project:masterfrom
mcalmer:configure-logging

Conversation

@mcalmer
Copy link
Copy Markdown
Contributor

@mcalmer mcalmer commented Oct 9, 2019

Warning

In most cases, it is not enough if you modify the terraform modules at modules/libvirt. Check if you also need changes at modules/openstack and modules/aws.

What does this PR change?

Configure logging and loglevel via main.tf .

As of now for salt and python backend.

@mcalmer
Copy link
Copy Markdown
Contributor Author

mcalmer commented Oct 9, 2019

Still need a good idea how to configure log4j.properties for tomcat and taskomatic

@moio
Copy link
Copy Markdown
Contributor

moio commented Feb 18, 2020

I think best would be to allow for a new parameter which is a map from log level to class or package names. It can be passed as-is via grains, then salt should pick it up and calculate lines to add to log4j.conf.

Example:

java_logging = {
 "DEBUG" : ["com.suse.manager.tasks, com.suse.manager.reactor.PGEventListener"],
 "INFO" : ["com.redhat.rhn.frontend.action.LoginAction"],
}

Should result in:

log4j.logger.com.redhat.rhn.frontend.action.LoginAction=INFO
log4j.logger.com.suse.manager.tasks=DEBUG
log4j.logger.com.suse.manager.reactor.PGEventListener=DEBUG 

(log4j.logger. is prepended and =LEVEL is appended)

Note that the log4.conf file should be extracted from rhn.jar (by default it does not exist) and then new lines should be added. The result should be copied in /srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties (for Tomcat), /usr/share/rhn/classes/log4j.properties (for Taskomatic) and usr/share/rhn/search/classes/log4j.properties (for Search). Parent directories might be missing.

Any plans to finish this PR? :-)

@nodeg
Copy link
Copy Markdown
Member

nodeg commented Jan 13, 2026

Is this still relevant or can we close this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants