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

Add log4j2 logger implementation #29

Merged
merged 1 commit into from
May 6, 2020
Merged

Conversation

baptistemesta
Copy link
Contributor

depends on #26
(for no good reasons :) )

@tbouffard
Copy link
Member

This is ok to me to use a log lib over a custom implementation for now.

As @baptistemesta mentioned in a commit of this PR, I suggest we later review/avoid external lib usage to reduce the footprint of our implementation if we want to embed it easily in other products.
log4j2 is great (the lambda stuff for instance superseeds slf4j in that area, at least until slf4j2 is out 😄 )

If you agree @baptistemesta, I will also update the App class to use log4j2 (instead of poorly managed stdout calls) for consistency

@baptistemesta
Copy link
Contributor Author

If you agree @baptistemesta, I will also update the App class to use log4j2 (instead of poorly managed stdout calls) for consistency

👍

I choosed log4j2 api instead of slf4j to have the lambda parameters
available. I think it could still work with slf4j by using the
log4j-to-slf4j binding ( to be verified )
If it does not work well I'll revert that to plain slf4j api

I included the implementation of the logger directly in the app. This
might not be the case if the project is split in an app + a lib

examples of logs produce when activating debug:

```
17:44:48.669 [main] DEBUG io.process.analytics.tools.bpmn.generator.algo.ShapeLayouter - Adding step3:
Diagram:
+-------+
|step1  |
|step2  |
|step3  |
+-------+

17:44:48.671 [main] DEBUG io.process.analytics.tools.bpmn.generator.algo.ShapeLayouter - Adding step4:
Diagram:
+--------------+
|step1         |
|step2  step4  |
|step3         |
+--------------+

17:44:48.672 [main] DEBUG io.process.analytics.tools.bpmn.generator.algo.ShapeLayouter - Adding step5:
Diagram:
+--------------+
|step1         |
|step2  step4  |
|       step5  |
|step3         |
+--------------+
```
@baptistemesta baptistemesta marked this pull request as ready for review May 6, 2020 13:55
@baptistemesta baptistemesta merged commit 41e5caf into master May 6, 2020
@baptistemesta baptistemesta deleted the add_logger_impl branch May 6, 2020 13:57
@tbouffard tbouffard added the chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants