Skip to content
This repository has been archived by the owner. It is now read-only.
Logrus plugin for logging to systemd-journald
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore initial checkin Feb 18, 2015
CONTRIBUTING.md
LICENSE
README.md
glide.yaml
journalhook.go Logrus org name changed case Jun 9, 2017
journalhook_test.go
wercker.yml

README.md

journalhook

systemd-journald hook for logrus

wercker status

Use

import "github.com/wercker/journalhook"

journalhook.Enable()

Note that this will discard all journal output. Generally when logging to the journal, your application will be managed by systemd, which will automatically capture command output and send it to the journal. This way we preempt that potential log message duplication.

If you'd like not to do that, it's as easy as:

import (
    "github.com/wercker/journalhook"
    "github.com/sirupsen/logrus"
)

logrus.AddHook(&journalhook.JournalHook{})
You can’t perform that action at this time.