public class

JiraLogLocator

extends Object
java.lang.Object
   ↳ com.atlassian.jira.util.log.JiraLogLocator

Class Overview

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.

Summary

Constants
String AJL_FILE_NAME The name of the log file.
Public Constructors
JiraLogLocator(JiraHome home)
Public Methods
@Nonnull Collection<File> findAllJiraLogFiles()
Return a collection of all JIRA log files.
File findJiraLogFile()
Return the main JIRA log file.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String AJL_FILE_NAME

The name of the log file.

Constant Value: "atlassian-jira.log"

Public Constructors

public JiraLogLocator (JiraHome home)

Public Methods

@Nonnull 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.

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

public File findJiraLogFile ()

Return the main JIRA log file.

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