Skip to content

carpentry-org/filelog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

filelog

A simple logging backend for log that works like simplelog except it writes its output to a file of the user’s choosing.

Example

(load "git@github.com:carpentry-org/filelog@0.0.4")

(defn main []
  (do
    (FileLog.install "log.txt" Log.DEBUG)
    (Log.trace "hi") ; will not be written to the file
    (Log.debug "hi again") ; will be written to the file
    (Log.warn "oops") ; will also be written to the file
  )
)

Caveats

Errors opening or writing to the file will result in a more or less graceful crash. This is intended behavior, but we’re open to hearing better solutions.


Have fun!

About

A simple file-based logger for Carp

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors