/mulog-prod-file

Mulog file logger suitable for production environments

Primary LanguageClojure

mulog-prod-file

μ/log file publisher for in production environments.

Usage

(require '[com.brunobonacci.mulog :as μ]
         '[jeroenvandijk.mulog.publishers.prod-file])
         
(def stop-pub (μ/start-publisher!
                 {:type :multi
                  :publishers
                  [{:type :console}
                   {:type :prod-file
                    :filename "tmp/app.log"
                    :max-file-count 20
                    :max-byte-count (* 100 1024) ;; 100kb per file
                    }]}))
                    
 (dotimes [i 10000]
    (μ/log ::hello :to "New World!"))      
    
(stop-pub)

Installation

In deps.edn

{:deps {
   io.github.jeroenvandijk/mulog-prod-file {:git/sha "HEAD"}
}}

Features

  • File rotation
  • EDN support

License

Copyright © 2023 Jeroen van Dijk - Distributed under the Apache License v2.0

This project contains code from Timbre (rotor.clj) which is licensed under the EPL 1.0.