Changing location of log file

Article ID:204421824
1 minute readKnowledge base


  • Want to change the location of the jenkins log from its default location of /var/log/jenkins to a different location.


  • CloudBees Jenkins Enterprise


Jenkins main log output is not configurable on RedHat native packages. You can change the init script, but I would not recommend to do so. You will then need to change logrotate configuration and it will introduce conflicts on package upgrade.

I would suggest to transform /var/log/jenkins to a symlink pointing to the new destination.

If SELinux is enabled you will likely need to fix the default context in the new location as the new location will not have the required attributes for logrotate (which means that logs don’t get rotated!).