SimpLog
Crystal lang shard which provides a file-based Log::Backend
that
supports automatic log file rotation, compression, and purging.
Installation
-
Add the dependency to your
shard.yml
:dependencies: simplog: github: lachlan/crystal-simplog
-
Run
shards install
Usage
require "simplog"
Log.setup_from_env(backend: SimpLog::FileBackend.new)
Log.info { "Hello World" } # => writes to log file ./log/<executable>.log
Contributing
- Fork it (https://github.com/lachlan/crystal-simplog/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Lachlan Dowding - creator and maintainer