crystal-simplog

Crystal lang shard which provides a file-based Log::Backend that supports automatic log file rotation, compression, and purging

SimpLog

Crystal lang shard which provides a file-based Log::Backend that supports automatic log file rotation, compression, and purging.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      simplog:
        github: lachlan/crystal-simplog
    
  2. 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

  1. Fork it (https://github.com/lachlan/crystal-simplog/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

crystal-simplog

Owner
Statistic
  • 2
  • 0
  • 0
  • 1
  • 0
  • 2 months ago
  • January 11, 2024
License

MIT License

Links
Synced at

Sat, 21 Dec 2024 15:09:42 GMT

Languages