Search code examples
loggingjenkinsjenkins-pluginsjenkins-cli

change the path of logs for jenkins as it fills up quickly


my server has an extra drive for logging but Jenkins doesn't use it and fills up / instead.so i want to change it to use /log instead of /var/log.

i tried to go to Manage Jenkins => Global Properties => Environment variables but couldn't see Environment Variables to set or change path of jenkins logs.


Solution

  • Jenkins does not write to the log file. Instead Jenkins writes to its standard output. Probably some script you use to start Jenkins redirects the output to a file under /var/log.

    Maybe this already gives you a hint on what you need to change. If not, please tell what is your operating system, how you installed Jenkins and how you start it. It is impossible to give detailed instructions without knowing more details of your environment.