https://github.com/sleibrock/racket-papertrail
Send syslog messages to Papertrail from Racket
https://github.com/sleibrock/racket-papertrail
logging papertrail racket
Last synced: 5 months ago
JSON representation
Send syslog messages to Papertrail from Racket
- Host: GitHub
- URL: https://github.com/sleibrock/racket-papertrail
- Owner: sleibrock
- License: mit
- Created: 2019-05-15T19:38:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-02T02:57:53.000Z (over 5 years ago)
- Last Synced: 2025-05-19T11:11:25.994Z (about 1 year ago)
- Topics: logging, papertrail, racket
- Language: Racket
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# racket-papertrail - a Papertrail Racket library
A [Papertrail](https://papertrailapp.com/) library for [Racket](https://racket-lang.org/).

## About
Papertrail is a service used to capture your program's/system's log messages and store them in an easy-to-access place. They use the [syslog](https://en.wikipedia.org/wiki/Syslog) standard to capture messages from servers or programs, and have written a service in Go called [remote_syslog2](https://github.com/papertrail/remote_syslog2). However, sometimes you don't always want to interop with your application's server and just want to capture data from the local program.
The aim of `racket-papertrail` is to send log messages from a Racket application to a target Papertrail destination sink. It can also send data to an output port like STDIN (if you modify the `current-output-port` parameter) so it can perform logging locally and remotely to Papertrail.
## Installing
`papertrail.rkt` can be installed through the standard Racket package manager `raco`.
## Using Papertrail
Create a new `paper` struct with `new-papertrail`, then initialize a logger through `create-paper-logger`.
```
(require papertrail)
(define p (new-papertrail "logs4.papertrailapp.com" 12345 "racket"))
(define log (create-paper-logger p))
(log "Hello world!")
(log "This is a fatal warning" "FATAL")
```