Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby bindings for sytemd's journal
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
LICENSE
README.md
systemd-journal.gemspec

README.md

systemd-journal http://github.com/zonque/systemd-journal.gem

DESCRIPTION:

The 'systemd-journal' gem provides Ruby bindings to systemd's journal, the structured logging system.

FEATURES/LIMITATIONS:

  • It currently only supports sending messages to the journal
  • There are no tests

SYNOPSIS:

require 'systemd-journal'

Systemd::Journal::print(Systemd::Journal::LOG_NOTICE, "Hello world")
Systemd::Journal::message(:MESSAGE           => "Hello world",
                          :RUBY_VERSION      => RUBY_VERSION,
                          :RUBY_PLATFORM     => RUBY_PLATFORM,
                          :RUBY_RELEASE_DATE => RUBY_RELEASE_DATE)

Systemd::Journal::print takes two arguments - a log level and the actual message. This method calls the C function sd_journal_print() internally. The level should be any of

Systemd::Journal::LOG_EMERG
Systemd::Journal::LOG_ALERT
Systemd::Journal::LOG_CRIT
Systemd::Journal::LOG_ERR
Systemd::Journal::LOG_WARNING
Systemd::Journal::LOG_NOTICE
Systemd::Journal::LOG_INFO
Systemd::Journal::LOG_DEBUG

Systemd::Journal::message is the full-fledged interface that takes arbitrary key-value pairs. It calls sd_journal_send internally, hence the same semantic than in any other language applies.

More information about systemd and the journal is available here:

REQUIREMENTS:

  • You need a system with system and systemd-journal installed and enabled.

DOWNLOAD/INSTALL:

From rubyforge:

[sudo] gem install systemd-journal

or build it from the git repository:

git clone git://github.com/zonque/systemd-journal.gem.git
cd systemd-journal.gem
gem build systemd-journal.gemspec

LICENSE:

See LICENSE file.

HISTORY:

  • v0.0.2 README and gemspec updates
  • v0.0.1 initial release
Something went wrong with that request. Please try again.