Giter Club home page Giter Club logo

log4j2-jsonevent-layout's Introduction

Welcome

Hi, I'm E.R.C. (known as dubas here)

IT professional and passionate of any kind of hardware (From a simple button to a rocket).

💻  Tech stack

I like to investigate, test and check any technology, so.. this list will be only the most relevant or it will be really long.

Java Spring Spring Boot php csharp

MicrosoftSQLServer MySQL SQLite MariaDB IBMDB2

ApacheMaven Ant CloudBees Github Actions Groovy

CSS3 JavaScript Bootstrap Angular

log4j2-jsonevent-layout's People

Contributors

dependabot[bot] avatar dubasdey avatar jebeaudet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jebeaudet

log4j2-jsonevent-layout's Issues

can't get it working - ERROR Appenders contains an invalid element or attribute "JSONLog4j2Layout"

I have an appenders section like

    <Appenders>
        <Appender type="Console" name="STDOUT">
            <Layout type="PatternLayout"
                    pattern="%X{UOW} %-5p %c{2}:%L - %m %X{host.address} %X{host.name} %X{username} %X{correlation.id} %n"/>
        </Appender>
        </Appenders>

I change it to

    <Appenders>
        <Appender type="Console" name="STDOUT">
            <JSONLog4j2Layout locationInfo="true"/>
        </Appender>
        </Appenders>

and I get this
ERROR Appenders contains an invalid element or attribute "JSONLog4j2Layout"

It would be really helpful if you had a complete configuration example :)

Invalid JSON being generated, missing contextMap

I updated from 0.0.4 to 0.0.7 and my log generated messages are all looking like this:

 {"@timestamp":"2023-06-14T08:55:49.153Z","logger_name":"REDACTED","level":"DEBUG","level_int":500,"thread_name":"http-nio-60003-exec-8","source_host":"REDACTED","source_ip":"REDACTED","message":"REDACTED","contextStack":[],,"@version":"1"}

notice the double ,, after contextStack which causes a JSON parsing error.

I compared the messages with the messages generated by 0.0.4 and the old messages always had "contextMap":[{"X-Generator":"JSONLog2j2Layout"}] at exactly that position, which is now missing completely from all messages.

Log4j version used is 2.20.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.