crystal-simplog
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
Repository
crystal-simplog
Owner
Statistic
- 2
- 0
- 0
- 1
- 0
- 29 days ago
- January 11, 2024
License
MIT License
Links
Synced at
Sun, 17 Nov 2024 03:04:08 GMT
Languages