Skip to content

Debugging library that logs all calls made to a Billy filesystem.

License

Notifications You must be signed in to change notification settings

Jille/billy-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

billy-logger

GoDoc

This library wraps your billy.Filesystem and logs all calls made and their results. Simplest usage:

-fs := memfs.New()
+fs := logger.Wrap(memfs.New(), log.Println)

If you're debugging multiple Billy filesystems, you can prefix your log lines with this:

el := log.New(log.Writer(), "emptyfs: ", log.Flags())
rl := log.New(log.Writer(), "router : ", log.Flags())
ml := log.New(log.Writer(), "mergeFS: ", log.Flags())
fs := router.New(logger.Wrap(emptyfs.New(), el.Println))
fs.Mount("/all", logger.Wrap(mergeFS{}, ml.Println))
fs := logger.Wrap(fs, rl.Println)

About

Debugging library that logs all calls made to a Billy filesystem.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages