configuration-as-code-plugin icon indicating copy to clipboard operation
configuration-as-code-plugin copied to clipboard

Add ability to configure log levels for plugins.

Open timbrown5 opened this issue 4 years ago • 3 comments
trafficstars

Your checklist for this issue

🚨 Please review the guidelines for contributing to this repository.

  • [x] Link to any upstream changes that might be required (for example Jenkins Core pull request)

Feature Request

I have looked (and tried to implement) https://support.cloudbees.com/hc/en-us/articles/115002626172-Configure-Loggers-for-Jenkins?page=42 and couldn't get it to work. I also think adding this to JCasC would offer a better experience:

We run Jenkins as a container and the above means we need to rebuild (or at least restart) the container if we make a change. Adding this to JCasC would mean we only need to reload the config.

timbrown5 avatar Nov 11 '21 08:11 timbrown5

It's this which is tracked on the jenkins issue tracker: https://github.com/jenkinsci/jenkins/pull/4538

will try resolve conflicts when I get a chance

timja avatar Nov 11 '21 08:11 timja

Ahh, sorry, didn't think to check there 😳

timbrown5 avatar Nov 11 '21 09:11 timbrown5

Resolved and build back to green and tests passing, hopefully it gets merged this time.

timja avatar Nov 14 '21 10:11 timja

partially related, I'm unable to determine precisely how to alter the default system log level through JCasC: i.e winstone to WARNING

Screenshot 2023-06-21 at 16 51 02

avnerv avatar Jun 21 '23 13:06 avnerv

That's a different feature and it may not be supported currently, generally you shouldn't want to change the default level and should create a log recorder instead

timja avatar Jun 21 '23 15:06 timja

That's a different feature and it may not be supported currently, generally you shouldn't want to change the default level and should create a log recorder instead

thanks for the quick response! got it, but, by creating another log creator for both winstone org.apache.sshd, which one will take precedence: the default log recorder or the custom log recorder?

avnerv avatar Jun 21 '23 15:06 avnerv

the custom log recorder will record everything that you set it to, it will go to that log recorder and not the system log

timja avatar Jun 21 '23 16:06 timja