Class JiraLogLocator

  extended by com.atlassian.jira.util.log.JiraLogLocator

public class JiraLogLocator
extends Object

Utility class to find the location of JIRA's log file. We try to locate the log file using:

  1. The file configured in the main appender. This is the best way and should work.
  2. The log file in the JIRA home directory (log/atlassian-jira.log).
  3. The atlassian-jira.log in the
It may be possible to have multiple JIRA log files sitting on the file system.


Field Summary
static String AJL_FILE_NAME
          The name of the log file.
Constructor Summary
JiraLogLocator(JiraHome home)
Method Summary
 Collection<File> findAllJiraLogFiles()
          Return a collection of all JIRA log files.
 File findJiraLogFile()
          Return the main JIRA log file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final String AJL_FILE_NAME
The name of the log file.

See Also:
Constant Field Values
Constructor Detail


public JiraLogLocator(JiraHome home)
Method Detail


public File findJiraLogFile()
Return the main JIRA log file.

the main JIRA log file. Can be null if it was not possible to find the log file.


public Collection<File> findAllJiraLogFiles()
Return a collection of all JIRA log files. JIRA may have multiple log files sitting around. All the returned files exist and can be read by JIRA.

A collection of all JIRA log files. The returned collection is ordered such that the current log file comes first.

Copyright © 2002-2012 Atlassian. All Rights Reserved.