Skip to content

Commit

Permalink
#1746 Fix typo that prevent log rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Feb 3, 2021
1 parent 0c52ea1 commit 8c096ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conf/migration-logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
converterClass="play.api.libs.logback.ColoredLevel"/>

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>./logs/migration.log</file>
<file>${application.home:-.}/logs/migration.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${application.home:-.}/logs/application.%i.log.zip</fileNamePattern>
<minIndex>1</minIndex>
Expand Down
2 changes: 1 addition & 1 deletion package/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/log/thehive/application.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>/var/log/logs/application.%i.log.zip</fileNamePattern>
<fileNamePattern>/var/log/thehive/application.%i.log.zip</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
Expand Down

2 comments on commit 8c096ef

@pitrh
Copy link

@pitrh pitrh commented on 8c096ef Feb 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The still untouched migration-logback.xml on my install did not have
./logs/migration.log but rather without the leading "."
and the fileNamePattern did not include a leading ${application.home:-.}.

However applying the change in the fileNamePattern in logback.xml and restarting the thehive service seems to have started log rotation going.

@To-om
Copy link
Contributor Author

@To-om To-om commented on 8c096ef Feb 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logback configuration for migration included in packages is not in /confdirectory but in /package

Please sign in to comment.