Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.0% on proxy.golang.org
Top 1.2% dependent packages on proxy.golang.org
Top 0.8% dependent repos on proxy.golang.org

proxy.golang.org : github.com/ssgreg/journald

Package journald offers Go implementation of systemd Journal's native API for logging. Key features are: Let's look at what the journald provides as Go APIs for logging: The JSON representation of the journal entry this generates: The primary reason for using the Journal's native logging APIs is a not just the source code location however: it is to allow passing additional structured log messages from the program into the journal. This additional log data may the be used to search the journal for, is available for consumption for other programs, and might help the administrator to track down issues beyond what is expressed in the human readable message text. Here's and example how to do that with journals.Send: This will write a log message to the journal much like the earlier examples. However, this times a few additional, structured fields are attached: Our structured message includes six fields. The first thow we passed are well-known fields: 1. MESSAGE= is the actual human readable message part of the structured message. 2. PRIORITY= is the numeric message priority value as known from BSD syslog formatted as an integer string. Applications may relatively freely define additional fields as they see fit (we defined four pretty arbitrary ones in our example). A complete list of the currently well-known fields is available here: https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html For more details visit https://github.com/ssgreg/journald-send Thanks to http://0pointer.de/blog/ for the inspiration.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/ssgreg/journald
Keywords: go, logging, systemd, systemd-journald
License: MIT
Latest release: over 5 years ago
First release: almost 7 years ago
Namespace: github.com/ssgreg
Dependent packages: 18
Dependent repositories: 53
Stars: 34 on GitHub
Forks: 2 on GitHub
Docker dependents: 1
Docker downloads: 16
See more repository details: repos.ecosyste.ms
Last synced: 27 days ago

    Loading...
    Readme
    Loading...