IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Starting with 196 systemd includes a message catalog system which allows augmentation on display of journal log messages with short explanation texts, keyed off the MESSAGE\_ID= field of the entry.
Many important log messages generated by systemd itself have message catalog entries.
External packages can easily provide catalog data for their own messages.
Message catalog source files are simple text files that follow an RFC822 inspired format.
To get an understanding of the format [here's an example file](http://cgit.freedesktop.org/systemd/systemd/plain/catalog/systemd.catalog), which includes entries for many important messages systemd itself generates.
On installation of a package that includes message catalogs all installed message catalog source files get compiled into a binary index, which is then used to look up catalog data.
Here's an example how a single catalog entry looks like in the text source format. Multiple of these may be listed one after the other per catalog source file:
```
-- fc2e22bc6ee647b6b90729ab34a250b1
Subject: Process @COREDUMP_PID@ (@COREDUMP_COMM@) dumped core
* Documentation: URIs for further user, administrator or developer documentation on the log entry. URIs should be listed in order of relevance, the most relevant documentation first.
* The actual catalog entry payload, as human readable prose.
Multiple paragraphs may be separated by empty lines.
The prose should first describe the message and when it occurs, possibly followed by recommendations how to deal with the message and (if it is an error message) correct the problem at hand.
This message text should be readable by users and administrators.
Information for developers should be stored externally instead, and referenced via a Documentation= header field.
* When a catalog entry is printed on screen for a specific log entry simple variable replacements are applied.
Journal field names enclosed in @ will be replaced by their values, if such a field is available in an entry.
If such a field is not defined in an entry the enclosing @ will be dropped but the variable name is kept.
See [systemd's own message catalog](http://cgit.freedesktop.org/systemd/systemd/plain/catalog/systemd.catalog) for a complete example for a catalog file.
Note that the message catalog is only available for messages generated with the MESSAGE\_ID= journal meta data field, as this is need to find the right entry for a message.
For more information on the MESSAGE\_ID= journal entry field see [systemd.journal-fields(7)](http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html).
* Use the [native Journal logging APIs](http://0pointer.de/blog/projects/journal-submit.html)
to generate your messages, and define message IDs for all messages you want to add catalog entries for.
You may use `journalctl --new-id128` to allocate new message IDs.
* Write a catalog entry file for your messages and ship them in your package and install them to `/usr/lib/systemd/catalog/`
(if you package your software with RPM use `%_journalcatalogdir`)
* Ensure that after installation of your application's RPM/DEB "`journalctl --update-catalog`" is executed, in order to update the binary catalog index.
(if you package your software with RPM use the `%journal_catalog_update` macro to achieve that.)