Skip to content

Commit

Permalink
[#140] Create log path in rotor appender (@dsapala)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsapala authored and ptaoussanis committed Dec 15, 2015
1 parent 37c1f34 commit cc6c3a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/taoensso/timbre/appenders/3rd_party/rotor.clj
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
output-str (output-fn data)]
(when-let [log (io/file path)]
(try
(when-not (.exists log)
(io/make-parents log))
(when (> (.length log) max-size)
(rotate-logs path backlog))
(spit path (str (output-fn data) "\n") :append true)
Expand Down

0 comments on commit cc6c3a3

Please sign in to comment.