Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

comandeo/syslog.cr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syslog.cr

Build Status

Syslog client implementation for Crystal (work in progress!)

Installation

Add this to your application's shard.yml:

dependencies:
  syslog:
    github: comandeo/syslog.cr

Usage

require "syslog"
# Use local syslog with defaults:
# - logging to `/dev/log`
# - syslog port: 514
# - log level: INFO
# - application hostname: localhost
# - application name: ""
# - syslog facility: local4
# - log level: INFO
logger = Syslog::Logger.new
logger.info("Something interesting happened")

# Use remote syslog with some custom params
logger = Syslog::Logger.new(
    remote: true,
    syslog_host: "logger.company.com",
    syslog_port: 1234,
    appname: "application.company.com",
    facility: Syslog::Facility::USER
)

logger.error("Something bad happened")

Contributing

  1. Fork it ( https://github.com/comandeo/syslog/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

  • comandeo Dmitry Rybakov - creator, maintainer

About

Syslog client implementation for Crystal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published