Back
rotor-appender (clj)
(source)function
(rotor-appender & [{:keys [path max-size backlog], :or {path "./timbre-rotor.log", max-size (* 1024 1024), backlog 5}}])
Returns a rotating file appender.
Examples
timbre
(ns taoensso.timbre.appenders.community.rotor-test
(:require
[clojure.test :refer :all]
[clojure.java.io :as io]
[clojure.set :as set]
[taoensso.timbre :as timbre]
[taoensso.timbre.appenders.community.rotor :as rotor]))
(defn setup
[n-logs]
(timbre/merge-config!
{:appenders {:rotor (rotor/rotor-appender
{:path logfile
:max-size 200
:backlog n-logs})}}))