-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Structured logging with ziggurat (#238)
* [Anmol|Shubhang] Add Structured logging capability * Add test for setting decoder when using json format * Remove log4j.test.xml * Removed unused code * Add mdc to text log * Excluding cambium macros from coverage * Quoting the cambium libs in cloverage * Add default log format * Change log level to error * Handling decreased line coverage * changes log formats and removes timezone block * moves set-properties-for-structured-logging inside initialize-config * Organize imports * Structuring ziggurat logs (#239) * Add structured logs to ziggurat logs * Fix linting * changes log formats and removes timezone block * adds logging context to mapper flow and rabbitmq consume flow * Resolve PR comments Co-authored-by: Anmol Vijaywargiya <[email protected]> Co-authored-by: shubhang.balkundi <[email protected]> * Updated changelog and project version for 4.2.0 Co-authored-by: Anmol Vijaywargiya <[email protected]> Co-authored-by: shubhang.balkundi <[email protected]>
- Loading branch information
1 parent
c8343fb
commit baaee63
Showing
15 changed files
with
191 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<configuration> | ||
<property name="type" value="${ZIGGURAT_LOG_FORMAT:-text}"/> | ||
|
||
<if condition='property("type").equals("json")'> | ||
<then> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> | ||
<layout class="cambium.logback.json.FlatJsonLayout"> | ||
<jsonFormatter class="ch.qos.logback.contrib.jackson.JacksonJsonFormatter"> | ||
<prettyPrint>false</prettyPrint> | ||
</jsonFormatter> | ||
<timestampFormat>yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</timestampFormat> | ||
<appendLineSeparator>true</appendLineSeparator> | ||
</layout> | ||
</encoder> | ||
</appender> | ||
</then> | ||
</if> | ||
|
||
<if condition='property("type").equals("text")'> | ||
<then> | ||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<pattern> | ||
[%-5level] %d [%t] %c:%M: %m { %mdc }%n | ||
</pattern> | ||
</layout> | ||
</appender> | ||
</then> | ||
</if> | ||
|
||
<root level="error"> | ||
<appender-ref ref="STDOUT"/> | ||
</root> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.