bug in ViewSystemInfo.getLogPath()

XMLWordPrintable

    • 3.04

      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.

              Assignee:
              Sam Chang [Atlassian]
              Reporter:
              Iliya Roubin
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: