Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-9093

bug in ViewSystemInfo.getLogPath()

    XMLWordPrintable

Details

    Description

      The code of getLogPath() merhod is the following:
      public String getLogPath()
      {
      File logFile = new File(LOG_FILE);
      String path;
      if (logFile.exists())

      { path = "file:" + logFile.getAbsoluteFile().toString(); }

      else

      { log.warn("Could not find " + LOG_FILE + " in current working directory"); path = "Could not find " + LOG_FILE + " in current working directory"; }

      return path;
      }

      where static final String LOG_FILE = "atlassian-jira.log";

      Well, every time I click System Info link in the System menu I get warning in my log, even though I don't use filelog in my log4j.properties at all.
      And it looks to me, it's not a very good idea to store log filename in final static variable. Can you retrieve it from the log4j properties? For instance, I want to use /var/log/jira/atlassian-jira.log file for logging and /etc/init.d as a working directory. In this case the log will be processed ok, but the warning will still take place.

      Attachments

        Issue Links

          Activity

            People

              sam@atlassian.com Sam Chang [Atlassian]
              dfc9c90c2a84 Iliya Roubin
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: