Skip to content

Commit 28977aa

Browse files
Refactor Log4j Json Generation
Use jackson directly to serialise the Log4j log events. Removes the old pattern layout approach. The new approach provides several callback and customisation features. They enable users to extend the library within their own applications. Furthermore, support for custom fields has been extended to support non-string values for top level fields. Also, CloudFoundry's VCAP environment variables are no longer added by default. The user has to opt in those fields The refactoring gives a factor 3 improvement on the JMH benchmarks for simple logs and an unchanged performance for request logs: Benchmark Mode Cnt Score Error Units EncodingBenchmarks.minimalRequestRecord thrpt 5 107274,684 ± 39379,575 ops/s EncodingBenchmarks.simpleLog thrpt 5 504838,974 ± 21313,854 ops/s EncodingBenchmarks.singleCommonFieldFromMdc thrpt 5 439796,897 ± 12174,050 ops/s EncodingBenchmarks.singleCustomFieldFromArgument thrpt 5 535903,222 ± 109794,213 ops/s
1 parent 0dd1c58 commit 28977aa

File tree

52 files changed

+987
-2726
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+987
-2726
lines changed

cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common/converter/DefaultCustomFieldsConverter.java

Lines changed: 0 additions & 129 deletions
This file was deleted.

cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common/converter/DefaultMessageConverter.java

Lines changed: 0 additions & 74 deletions
This file was deleted.

cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common/converter/DefaultPropertiesConverter.java

Lines changed: 0 additions & 94 deletions
This file was deleted.

cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common/converter/DefaultStacktraceConverter.java

Lines changed: 0 additions & 61 deletions
This file was deleted.

cf-java-logging-support-core/src/main/java/com/sap/hcp/cf/logging/common/converter/StacktraceConverter.java

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)