Skip to content

Commit 2df51fb

Browse files
committed
Keep rolled logs in log dir
Otherwise, they are written to the cwd, wich is the app user on the server.
1 parent 978eeab commit 2df51fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/logback.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<file>${log.dir:-logs}/clojars.ednl</file>
55
<!-- Handling rotation here instead of via logrotate in the server config to avoid restarting the process -->
66
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
7-
<fileNamePattern>clojars-%d{yyyy-MM-dd}.%i.ednl.gz</fileNamePattern>
7+
<fileNamePattern>${log.dir:-logs}/clojars-%d{yyyy-MM-dd}.%i.ednl.gz</fileNamePattern>
88
<maxFileSize>64MB</maxFileSize>
99
<maxHistory>14</maxHistory>
1010
<totalSizeCap>512GB</totalSizeCap>
@@ -18,7 +18,7 @@
1818
<file>${log.dir:-logs}/clojars.log</file>
1919
<!-- Handling rotation here instead of via logrotate in the server config to avoid restarting the process -->
2020
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
21-
<fileNamePattern>clojars-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
21+
<fileNamePattern>${log.dir:-logs}/clojars-%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
2222
<maxFileSize>64MB</maxFileSize>
2323
<maxHistory>14</maxHistory>
2424
<totalSizeCap>512GB</totalSizeCap>

0 commit comments

Comments
 (0)