Skip to content

Instantly share code, notes, and snippets.

@megastef
Last active March 21, 2017 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save megastef/f96f0424353aee5e1c603b0900662d07 to your computer and use it in GitHub Desktop.
Save megastef/f96f0424353aee5e1c603b0900662d07 to your computer and use it in GitHub Desktop.
log4j logagent pattern
originalLine: false
patterns:
- # log4j logs, please replace sourceName with a pattern for your image or container name
sourceName: !!js/regexp /.*/i
blockStart: !!js/regexp /^\d+\/\d+\/\d+\s/
match:
- regex: !!js/regexp /(\d+\/\d+\/\d+\s\d+\:\d+\:\d+)\s\S+\s\S+\s\[(\S+)\]\s(\S+)\s+(\S+)\s+-\s+([\S\|\s]+)/i
type: yourAppNameLog4j
fields:
- ts
- thread
- severity
- class
- message
dateFormat: MM/DD/YYYY HH:mm:ss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment