huskie

Homepage: http://github.com/nicferrier/emacs-huskie

Author: Nic Ferrier

Updated:

Summary

Chainsaw powered logging

Commentary

Make logging through processes.

Named after my trusty Huskavana chainsaw. How I love it.

Usage:

(huskie-log "something" "logger-name")

will send "something" to the "logger-name" which will be
automatically mapped to a file in "/tmp/logger-name"

The automatic file mapping is done with
`huskie-log-default-directory' which is a variable you can let-bind
or simply change.

(let ((huskie-log-default-directory "/home/nictest"))
  (hukie-log "just a test" "my-log"))

will send "just a test" to the log process "my-log" and create a
file "/home/nictest/my-log"

The mapping between filenames and lognames can be defined:

(huskie-bind-logname->filename "nictest" "/tmp/my-log")
(huskie-log "test100!" "nictest")

will send "test100!" to the file "/tmp/my-log" though a logging
process called "nictest" will be created.

All the logging is done through async processes. A default process
is used unless something specific exists for the logname. Setting a
script can be done with `huskie-set-script'.

The script MUST include a single %s to accept the filename. Failure
to do so will result in an error.

The script MUST be a shell script.

(huskie-set-script
   "nictest"
   "while read line; do logger -f %s $line ; done")
(huskie-log "test 200" "nictest")

will send "test 200" through "nictest" via the syslog logger
program.

Dependencies

Reverse dependencies