add reference for clarity
This commit is contained in:
parent
54590dc289
commit
dc96f3365d
3 changed files with 14 additions and 4 deletions
16
README.md
16
README.md
|
@ -3,7 +3,6 @@
|
||||||
[](https://travis-ci.org/jprante/systemd-journal)
|
[](https://travis-ci.org/jprante/systemd-journal)
|
||||||
[](http://maven-badges.herokuapp.com/maven-central/org.xbib/log4j-systemd-journal)
|
[](http://maven-badges.herokuapp.com/maven-central/org.xbib/log4j-systemd-journal)
|
||||||
[](https://opensource.org/licenses/Apache-2.0)
|
[](https://opensource.org/licenses/Apache-2.0)
|
||||||
[](https://www.paypal.me/JoergPrante)
|
|
||||||
|
|
||||||
## Reading systemd-journal from Java
|
## Reading systemd-journal from Java
|
||||||
|
|
||||||
|
@ -11,8 +10,15 @@ Please see the junit test file to find out how to consume systemd journal from J
|
||||||
|
|
||||||
The implementation use bridj.
|
The implementation use bridj.
|
||||||
|
|
||||||
|
The work is based on https://github.com/bartlinga/systemd-journal which is unreleased.
|
||||||
|
|
||||||
## Log4j2 systemd-journal appender
|
## Log4j2 systemd-journal appender
|
||||||
|
|
||||||
|
This is a modified version of https://github.com/bwaldvogel/log4j-systemd-journal-appender
|
||||||
|
where all the warm applause and admiration should go to.
|
||||||
|
|
||||||
|
The documentation is reproduced here for reference.
|
||||||
|
|
||||||
This [Log4j][log4j] appender logs event meta data such as timestamp, logger name, exception stacktrace,
|
This [Log4j][log4j] appender logs event meta data such as timestamp, logger name, exception stacktrace,
|
||||||
[ThreadContext (MDC)][thread-context] or the thread name to [fields][systemd-journal-fields]
|
[ThreadContext (MDC)][thread-context] or the thread name to [fields][systemd-journal-fields]
|
||||||
in [systemd journal][systemd-journal].
|
in [systemd journal][systemd-journal].
|
||||||
|
@ -147,11 +153,13 @@ You can use the power of [systemd journal][systemd-journal] to filter for intere
|
||||||
|
|
||||||
`journalctl CODE_FUNC=testMessageWithMDC THREAD_NAME=main` will only show messages that are logged from the Java main thread in a method called `testMessageWithMDC`.
|
`journalctl CODE_FUNC=testMessageWithMDC THREAD_NAME=main` will only show messages that are logged from the Java main thread in a method called `testMessageWithMDC`.
|
||||||
|
|
||||||
## Bridj or JNA
|
## Bridj or JNA?
|
||||||
|
|
||||||
As you noted, I use both bridj and JNA. But only one is necessary. The only reason for this is that it works.
|
As you noted, I use both bridj and JNA. But only one is necessary.
|
||||||
|
|
||||||
bridj looks easier and more powerful, but is getting old. I am considering a fork of bridj and implement a log4j2 appender for bridj, or porting the API methods `sd_journal_open`, `sd_journal_add_match`, etc. to JNA.
|
The only reason for this is that it works.
|
||||||
|
|
||||||
|
Bridj looks easier and more powerful, but is getting old. I am considering a fork of bridj and implement a log4j2 appender based on bridj, or porting the API methods `sd_journal_open`, `sd_journal_add_match`, etc. to JNA.
|
||||||
|
|
||||||
Feel free to submit patches.
|
Feel free to submit patches.
|
||||||
|
|
||||||
|
|
1
log4j-systemd-journal/NOTICE.txt
Normal file
1
log4j-systemd-journal/NOTICE.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Modified version of https://github.com/bwaldvogel/log4j-systemd-journal-appender
|
1
systemd-journal/NOTICE.txt
Normal file
1
systemd-journal/NOTICE.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
A systemd-journal Java API, based on https://github.com/bartlinga/systemd-journal
|
Loading…
Reference in a new issue