This repository has been archived by the owner. It is now read-only.
fluent-logger-crystal
fluent-logger-crystal
fluet-logger implementation for Crystal inspired by fluent-logger-ruby
Installation
Add this to your application's shard.yml
:
dependencies:
fluent-logger:
github: takaishi/fluent-logger-crystal
Usage
Simple
require "fluent-logger"
log = Fluent::Logger::FluentLogger.new(nil, host: "localhost", port: 24224)
unless log.post("myapp.access", {agent: "foo"})
p log.last_error # You can get last error object via last_error method
end
# output: myapp.access {"agent":"foo"}
Singleton
require "fluent-logger"
Fluent::Logger::FluentLogger.open(nil, host: "localhost", port: 24224)
Fluent::Logger.post("myapp.access", {agent: "foo"})
# output: myapp.access {"agent":"foo"}
Tag Prefix
require "fluent-logger"
log = Fluent::Logger::FluentLogger.new("myapp", host: "localhost", port: 24224)
log.post("access", {agent: "foo"})
# output: myapp.access {"agent":"foo"}
TODO: Write usage instructions here
Development
TODO: Write development instructions here
Contributing
- Fork it ( https://github.com/takaishi/fluent-logger-crystal/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
- takaishi Ryo Takaishi - creator, maintainer
Repository
fluent-logger-crystal
Owner
Statistic
- 1
- 0
- 0
- 0
- 2
- almost 9 years ago
- March 21, 2016
License
MIT License
Links
Synced at
Sun, 27 Apr 2025 09:28:33 GMT
Languages