Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/comandeo/syslog.cr
Syslog client implementation for Crystal
https://github.com/comandeo/syslog.cr
Last synced: 9 days ago
JSON representation
Syslog client implementation for Crystal
- Host: GitHub
- URL: https://github.com/comandeo/syslog.cr
- Owner: comandeo
- License: mit
- Archived: true
- Created: 2015-09-26T18:42:39.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-28T14:47:46.000Z (over 5 years ago)
- Last Synced: 2024-08-01T17:35:54.591Z (3 months ago)
- Language: Crystal
- Size: 13.7 KB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - syslog.cr - Implementation of Syslog client (Logging and monitoring)
- awesome-crystal - syslog.cr - Implementation of Syslog client (Logging and monitoring)
README
# Syslog.cr
[![Build Status](https://travis-ci.org/comandeo/syslog.cr.svg?branch=master)](https://travis-ci.org/comandeo/syslog.cr)Syslog client implementation for Crystal (work in progress!)
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
syslog:
github: comandeo/syslog.cr
```## Usage
```crystal
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")
```
## Contributing1. 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](https://github.com/comandeo) Dmitry Rybakov - creator, maintainer