Giter Site home page Giter Site logo

Comments (3)

dhaval24 avatar dhaval24 commented on May 12, 2024 1

@tobiasdiez thank you very much for the input. I will soon push out a PR. But most likely, it won't be a part of stable release of 2.0.0-BETA, instead would come out in 2.0.1 release as this would be a new feature, and just would defy the transition of Beta to stable.

from applicationinsights-java.

dhaval24 avatar dhaval24 commented on May 12, 2024

@tobiasdiez could you please shed some more details on this issue? Also, I see you suggesting a fix in the issue discussion. We are very open to contributions and would be really great if you could send a PR if it is possible ?

from applicationinsights-java.

tobiasdiez avatar tobiasdiez commented on May 12, 2024

Sadly, I don't have time right now to create a PR but, of course, I'm happy to provide more details.

The default log4j2 appender accept the options filter, layout, ignoreExceptions (see AbstractAppender). The ApplicationInsightsAppender should also support these basic settings. For this, the factory method
https://github.com/Microsoft/ApplicationInsights-Java/blob/36214d5c28eb975e008c5b7c60c4840fdd10ec20/logging/log4j2/appenderSrc/main/java/com/microsoft/applicationinsights/log4j/v2/ApplicationInsightsAppender.java#L81-L83
needs to be extended by the arguments @PluginAttribute("ignoreExceptions") boolean ignoreExceptions, @PluginElement("Layout") Layout layout, @PluginElement("Filters") Filter filter (see log4j documentation for an example. What is not shown in the example is that you simply pass these arguments to the parent constructor.).
Moreover, the log4j documentation suggests to use the builder pattern.

from applicationinsights-java.

Related Issues (20)

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.