/racket-papertrail

Send syslog messages to Papertrail from Racket

Primary LanguageRacketMIT LicenseMIT

racket-papertrail - a Papertrail Racket library

A Papertrail library for Racket.

a dummy papertrail demo image

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 standard to capture messages from servers or programs, and have written a service in Go called 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")