7

The Jenkins that we use for ETL automation stopped its service and then restarted it using command prompt. But I wanted to investigate about the reason that caused it to stop. But in System log file of Jenkins I can see only today's log. How can I see log of previous days. Please help.

Bommu
  • 229
  • 1
  • 4
  • 14

2 Answers2

13

If you are using a linux machine logs will be in /var/log/jenkins/jenkins.log unless you have set customized location. If you have set any logrotate it will be archived and you might require to unzip and check those to see previous logs.

Take a look at this documentation for more info

slashpai
  • 1,141
  • 7
  • 12
  • Thanking you for your comment. I am using windows and i found this %JENKINS_HOME%/jenkins.out and %JENKINS_HOME%/jenkins.err . Is this a command or path?. How I can use this to get the log? – Bommu Mar 22 '18 at 04:15
  • No i am not. I just got the %JENKINS_HOME%/jenkins.out command from the documentation given by you. but how can i use it as a command? please help. – Bommu Mar 22 '18 at 04:23
  • Open your command prompt and check what is the value of JENKINS_HOME. Simply typing it in dos prompt will display value I think (I am not a windows person :) ) – slashpai Mar 22 '18 at 04:31
  • Once you get that you can simply cd or directly cd to $JENKINS_HOME will also work I think. You should be able to see logs. You would be also be able to check variable from control panel- system-advanced system settings-environment variables – slashpai Mar 22 '18 at 04:34
  • 1
    If you are unable to find %JENKINS_HOME% go to Manage Jenkins > Configure sytem. There can find Jenkins home path(Should be the first field) Thats the Jenkins Home directory, You can locate the logs under that. – Ravindranath Barathy Mar 22 '18 at 04:45
  • I got the .err file and .out file but It doesn't have log details. .out file is empty and .err file is last updated long before. And in jenkins.xml i cannot see any config related to log. – Bommu Mar 22 '18 at 06:37
  • Check if you have set any custom log location instead of default one – slashpai Mar 22 '18 at 17:26
0

I found logs from the web panel https://jenkins.mycompany.com.ua/log/all

Dmitry Ivanov
  • 508
  • 7
  • 9