Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use logstash-logback-encoder (JSON logging) #7

Closed
hohwille opened this issue Sep 20, 2018 · 3 comments
Closed

use logstash-logback-encoder (JSON logging) #7

hohwille opened this issue Sep 20, 2018 · 3 comments
Labels
enhancement New feature or request logging slf4j, logback, logstash, ELK, greylog, etc.
Milestone

Comments

@hohwille
Copy link
Member

For logging eiPaaS is using ELK and today I learned that they have standardized the log-format and require apps to follow this. This technically means they use this standard OSS encoder for logback which produces JSON log lines instead of regular text patterns:
https://github.com/logstash/logstash-logback-encoder
@amarinso stated:

I would vote for having a single log file, json formatted and tools (or tips or techniques ) to split it if required or filter/prettyprint. We should be pushing for systems where log aggregators are the new normal. Let's make modern techniques, principles and patterns our default blueprint.

@maihacke stated:

I totally agree. Having a central log-collection is normal today and e.g. a security requirement in German public sector projects. So we should go with the JSON-Format per default.
I do so and have a special log-config for development where it is deactivated.

@hohwille hohwille added enhancement New feature or request logging slf4j, logback, logstash, ELK, greylog, etc. labels Sep 20, 2018
@amarinso
Copy link
Member

We should test if the JSON output formatting adds any noticeable performance penalty for an app, so in that case we can even go for async appenders. I read out of curiosity that in logstash they are using LMAX disruptor for enqueing the messages... nice!

@hohwille hohwille added this to the release:3.0.0 milestone Sep 24, 2018
hohwille added a commit to hohwille/devon4j that referenced this issue Nov 6, 2018
hohwille added a commit to hohwille/devon4j that referenced this issue Nov 6, 2018
hohwille added a commit that referenced this issue Nov 12, 2018
* #7: use json logging for non-dev usage by default

* #7: follow our own guide and put dependency version into BOM
@hohwille
Copy link
Member Author

merged PR #36 hence done.

@hohwille
Copy link
Member Author

We should test if the JSON output formatting adds any noticeable performance penalty for an app, so in that case we can even go for async appenders. I read out of curiosity that in logstash they are using LMAX disruptor for enqueing the messages... nice!

I do not see a real issue with the log messages we are producing. In production regular mode will most probably even to raise the loglevel to INFO.
However, your knowledge/observation about async appenders sounds very interesting. Please feel invited to add a link or some example config to the documentation:
https://github.com/devonfw-wiki/devon4j/wiki/guide-logging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request logging slf4j, logback, logstash, ELK, greylog, etc.
Projects
None yet
Development

No branches or pull requests

2 participants