[ANNOUNCE] Apache Log4j Tools `0.9.0` released

2024-05-14 Thread Volkan Yazıcı
Apache Log4j Tools team is pleased to announce the `0.9.0` release. This project provides tooling internally used by the Apache Log4j project. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/log4j/tools == Release Notes This minor

Re: Feature Request: Named Arguments for Structured Logging such as JSON

2024-04-08 Thread Volkan Yazıcı
As Ralph states, this is already supported by JSON Template Layout (JTL). (Note that `JsonLayout` is deprecated in favor of `JsonTemplateLayout`.) But Ralph's statement needs a correction: You don't need to fallback to Pattern

Re: Wrapped exceptions

2024-04-05 Thread Volkan Yazıcı
If a user can simply solve this using a `ScriptFilter`, I am not keen on adding a custom filter to support this use case out of the box – in particular, when the user themselves signals "a poor design" on the application side. I am in favor of making the custom filter implementation process as

Re: Wrapped exceptions

2024-04-04 Thread Volkan Yazıcı
You should be able to describe this logic in your scripting language of preference using a ScriptFilter in your Log4j configuration file. On Thu, Apr 4, 2024 at 5:27 PM Robert Egan wrote: > I am currently working with an

[ANNOUNCE] Apache Log4j 2.23.1 released

2024-03-10 Thread Volkan Yazıcı
Apache Log4j team is pleased to announce the 2.23.1 release. Apache Log4j is a versatile, industrial-strength Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. For further information (support, download, etc.) see the

[ANNOUNCE] Apache Log4j Scala 13.1.0 released

2024-02-06 Thread Volkan Yazıcı
Apache Log4j Scala team is pleased to announce the 13.1.0 release. This project provides a Scala-friendly interface to log against the Log4j API. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/log4j/scala === Release Notes This minor

Re: Support of log4j2

2024-01-10 Thread Volkan Yazıcı
It's reassuring to hear you aim to keep > supporting log4j2. Could this be added to the website? > > Regarding log4j3, I opened a PR to update the website to mention Java > 17 instead of Java 11: > https://github.com/apache/logging-log4j-site/pull/8 > > Thanks, > Mickael > >

Re: Support of log4j2

2024-01-10 Thread Volkan Yazıcı
Hey Mickael, Thanks for reaching out to us and sharing your concerns. Community feedback is of uttermost importance on how we prioritize development and maintenance tasks. You are right that Log4j 3 is planned to target Java 17. Yet I can assure you that Log4j 2 (targeting Java 8) will be around

[ANNOUNCE] Apache Log4j 3.0.0-beta1 released

2023-12-22 Thread Volkan Yazıcı
Apache Log4j team is pleased to announce the 3.0.0-beta1 release. Apache Log4j is a versatile, industrial-strength Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. For further information (support, download, etc.) see the

[ANNOUNCE] Apache Logging Parent 10.5.0 released

2023-12-21 Thread Volkan Yazıcı
Apache Logging Parent team is pleased to announce the 10.5.0 release. This project contains the parent POM for other Maven-based Apache Logging Services projects. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/logging-parent ===

[ANNOUNCE] Apache Log4j Tools 0.7.0 released

2023-12-18 Thread Volkan Yazıcı
Apache Log4j Tools team is pleased to announce the 0.7.0 release. This project provides tooling internally used by the Apache Log4j project. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/log4j/tools === Release Notes This minor

[ANNOUNCE] Apache Log4j Tools 0.6.0 released

2023-11-20 Thread Volkan Yazıcı
The Apache Log4j Tools team is pleased to announce the 0.6.0 release. This project provides tooling internally used by the Apache Log4j project. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/log4j/tools === Release Notes This minor

[ANNOUNCE] Apache Log4j JMX GUI 2.22.0 released

2023-11-20 Thread Volkan Yazıcı
Apache Log4j JMX GUI[1] team is pleased to announce the 2.22.0 release. This project provides a Swing-based client for remotely editing the Log4j configuration and remotely monitoring `StatusLogger` output. It can be run as a standalone application or as a JConsole plugin. [1]

[ANNOUNCE] Apache Log4j 2.22.0 released

2023-11-20 Thread Volkan Yazıcı
The Apache Log4j team is pleased to announce the 2.22.0 release. Apache Log4j is a versatile, industrial-strength Java logging framework composed of an API, its implementation, and components to assist the deployment for various use cases. For further information (support, download, etc.) see the

[ANNOUNCE] Apache Log4j Scala 13.0.0 released

2023-10-13 Thread Volkan Yazıcı
Apache Log4j Scala team is pleased to announce the 13.0.0 release. This project provides a Scala-friendly interface to log against the Log4j API. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/log4j/scala === Release Notes The

[ANNOUNCE] Apache Log4j Kotlin API 1.3.0 released

2023-10-06 Thread Volkan Yazıcı
Apache Log4j Kotlin API team is pleased to announce the 1.3.0 release. This project contains a Kotlin-friendly interface to log against the Log4j API. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/log4j/kotlin === Release Notes This

Re: Are globs or regular expressions supported in logger names in config files?

2023-10-06 Thread Volkan Yazıcı
You're right. Then maybe using a `ScriptFilter`? On Thu, Oct 5, 2023 at 10:43 PM Ralph Goers wrote: > > > > On Oct 5, 2023, at 6:47 AM, Volkan Yazıcı wrote: > > > > Wouldn't it be possible to use an arbiter instead? For instance, you can > > use a `ScriptArbiter

Re: Are globs or regular expressions supported in logger names in config files?

2023-10-05 Thread Volkan Yazıcı
Wouldn't it be possible to use an arbiter instead? For instance, you can use a `ScriptArbiter` that checks the package name, and if matches, passes the log event to your appender, On Thu, Oct 5, 2023 at 3:13 PM Thorsten Schöning < thorsten.schoen...@veda.net> wrote: > Hi everyone, > > I have

Re: Log4j module deprecation

2023-09-28 Thread Volkan Yazıcı
ies don't provide a Java interface -- most recently for a commercial > product using one of the most popular license-management packages in use > today. > > ⁣--Wayne > > On Sep 28, 2023, 02:05, at 02:05, "Volkan Yazıcı" wrote: > >I have cross-posted this to GitHub

[ANNOUNCE] Apache Logging Parent 10.1.0 released

2023-09-28 Thread Volkan Yazıcı
Apache Logging Parent team is pleased to announce the 10.1.0 release. This project contains the parent POM for other Maven-based Apache Logging Services projects. For further information (support, download, etc.) see the project website[1]. [1] https://logging.apache.org/logging-parent ===

Re: Log4j module deprecation

2023-09-28 Thread Volkan Yazıcı
I have cross-posted this to GitHub Discussions too. Feel free to participate there, if that is of your preference. On Thu, Sep 28, 2023 at 9:35 AM Piotr P. Karwasz wrote: > Hi all, > > We always strive to only release

[ANNOUNCE] Apache Log4j JMX GUI 2.21.0 released

2023-09-18 Thread Volkan Yazıcı
Apache Log4j JMX GUI[1] team is pleased to announce the 2.21.0 release. This project provides a Swing-based client for remotely editing the Log4j configuration and remotely monitoring `StatusLogger` output. It can be run as a standalone application or as a JConsole plugin. # Release Notes This

[ANNOUNCE] Apache Logging Parent 10.0.0 released

2023-09-12 Thread Volkan Yazıcı
This minor release contains various improvements that we expect to relieve the load on `pom.xml` and GitHub Actions workflows of Maven-based projects we parent. This is of particular importance while managing and cutting releases from multiple repositories. See `README.adoc` for the complete list

Re: ListAppender in parallel tests

2023-05-08 Thread Volkan Yazıcı
Thanks so much for the elaborate investigation and taking the effort to share your findings with us. I want to participate in this therapy session. I learnt the hard way that one should test the logging behaviour of a certain class. That is, the logging behaviour of subject should be a part of

Re: Need help in configuring localHostname in log4j2 syslog appender

2023-05-02 Thread Volkan Yazıcı
The `localHostname` field of `SyslogLayout` you are pointing to is constant and not configured by user-provided properties. Feel free to submit a ticket (along with a PR?) to fix this. But your problem is not that one. When `format` is set to `RFC5424`, `SyslogAppender` uses `Rfc5424Layout` – not

Re: log4j2 API and JUL logging framework

2023-01-25 Thread Volkan Yazıcı
That is a really good question addressing a concern that should be shared by every single Java library developer out there, Usha. We sadly don't have an official answer to this – we should and maybe who knows, you can contribute that to the Log4j manual! But let me share my take on the matter.

Re: PatternLayout caching system property lookup values

2022-11-18 Thread Volkan Yazıcı
Hey Stig, I see the problem and I don't know of a way to disable the substitution performed at "pattern compile-time", which is possibly there due to efficiency reasons. Others might have a better idea, though, given you try to glue a business logic via lookups, what you can also do is to

Re: PatternLayout Vs JsonTemplateLayout/JsonLayout Performance Comparision

2022-11-16 Thread Volkan Yazıcı
Hey Ganapathi! First, `JsonLayout` (JL) and `JsonTemplateLayout` (JTL) are two different beasts, but more importantly, JTL is the successor of JL. We are keeping JL around only for backward-compatibility reasons. All JSON-based log needs are advised to be sufficed using JTL. JTL is heavily

Re: AddAppender programmatically in a proper way

2022-10-21 Thread Volkan Yazıcı
The snippet you shared tries to add your custom appender to an already initialized logger context. Do you really need to add your appender after initialization and programmatically? If not, you can simply use your appender in `log4j2.xml` given you have its class in a package scanned by Log4j. You

Re: ListAppender in parallel tests

2022-06-05 Thread Volkan Yazıcı
As Ralph has indicated, the best approach would be to create a new `LoggerContext` for each test verifying the logging behavior. `LoggerContextRule` in the sources might be a good starting point for you. I am actually interested in your feedback, if you happen to use it somehow. We might consider

Re: Need help creating second, separate logger

2022-05-20 Thread Volkan Yazıcı
Stephen, given your past questions, I see that you are trying to programmatically configure Log4j with interesting features, e.g., multiple logger contexts and such. May I ask what is your use case? What are you exactly trying to solve? On Thu, May 19, 2022 at 5:57 PM Stephen Johns wrote: > I

Re: Sprint-boot 1.5.x with maven is affected por log4j vulnerability?

2022-03-30 Thread Volkan Yazıcı
Nope, judging from the output you've shared, your project doesn't use Log4j as a backend. `log4j-over-slf4j` simply forwards calls made to Log4j 1 API to SLF4J. On Tue, Mar 29, 2022 at 11:00 PM Juan Jose Silupú Maza < juansilupum...@gmail.com> wrote: > I have a maven project with spring-boot

Re: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-25 Thread Volkan Yazıcı
Pooja, I think it would be better for attachments and such if you create a JIRA ticket . What would be ideal is to share a simple program (a Java file + Log4j configuration) reproducing the issue in the ticket. This would help us a lot to

Re: [log4j] PatternLayout %ex{filters(package,package,...)} not implemented?

2022-02-15 Thread Volkan Yazıcı
Hello Janaka & Damien, This discrepancy indeed seems like a bug. Would you mind first filing a JIRA ticket, please? @Janaka, if you can contribute this feature in a PR that would be great! To avoid redundant iterations, would you mind briefly describing how you plan to address the issue in the

Re: Log4j

2022-02-04 Thread Volkan Yazıcı
Hello Thyagarajan, `secur...@logging.apache.org` list is used for vulnerability reports, not user questions. Please use `log4j-user@logging.apache.org` mailing list for your questions. Below I try to answer your questions: > 1) Is there any script or command to verify which application utilizes

Re: System logger and unexpanded placeholders

2022-01-07 Thread Volkan Yazıcı
Thanks for reaching out, Travis! I don't have much of an experience in log4j-jpl, but after a 15min check, this definitely seems like a bug to me. (`MessageFormatMessage` should have been used instead of `ParametrizedMessage`, I guess.) Mind filling in a JIRA ticket along with your findings,

Re: log4j use bridge

2022-01-04 Thread Volkan Yazıcı
Hello, Please use log4j-user@logging.apache.org mailing list for questions, so that others can benefit too. security@ mailing list is used for reporting vulnerabilities. Log4j1 and Log4j2 are two totally separate code bases. The vulnerabilities affecting them are different too, hence those are

[ANNOUNCE] Apache Log4j 2.12.2 released

2021-12-14 Thread Volkan Yazıcı
The Apache Log4j 2 team is pleased to announce the Log4j 2.12.2 release! Apache Log4j is a well known framework for logging application behavior. Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many other modern features such as

Re: Web application name.

2021-11-23 Thread Volkan Yazıcı
Would web:servletContextName lookup work for you? On Tue, Nov 23, 2021 at 3:46 PM vahid ghasemi wrote: > Hello guys. > How can I log my web application name? >

Re: Question regarding JSON Template timestamp rendering

2021-11-01 Thread Volkan Yazıcı
Thanks so much for confirming the fix and more importantly, sparing time to share the issue with us. 2.15.0 is supposed to be released soon. We are waiting for some changes from another maintainer (I am looking at you Ralph) and then we will be done. What I would really appreciate is some details

Re: Question regarding JSON Template timestamp rendering

2021-10-28 Thread Volkan Yazıcı
Andrew, I have pushed a fix to the `release-2.x` branch with commit `2dd7063fb6c6fe73070aded6607a2e2d53613b46`. Mind giving it a try, please? For the records, created LOG4J2-3183 <https://issues.apache.org/jira/browse/LOG4J2-3183>. On Thu, Oct 28, 2021 at 11:02 AM Volkan Yazıcı wrote

Re: Question regarding JSON Template timestamp rendering

2021-10-28 Thread Volkan Yazıcı
I sadly am able to reproduce the issue Andrew: public final class TimeDriftDemo { public static void main(String[] args) throws InterruptedException { initLog4j(); Logger logger = LogManager.getLogger(); for (int i = 0; i < 5; i++) { logger.info("{}", i);

Re: Question regarding JSON Template timestamp rendering

2021-10-25 Thread Volkan Yazıcı
Hey Andrew, Thanks so much for reaching out. I have tried to reproduce your issue via unit tests, but had no luck so far: @Test void test_conflicting_timestamps() { // Create the event template. final String eventTemplate = writeJson(asMap( "timestamp.epoch", asMap(

Re: Is there a way to develop my own resolver for JSON template layout?

2021-09-20 Thread Volkan Yazıcı
alking had > provided a > simple way to inject it into the ThreadContextMap. Then nothing special > would be needed. > > Ralph > > > On Sep 19, 2021, at 12:24 PM, Volkan Yazıcı > wrote: > > > > This is the first time I have ever heard about SkyWalking, hence > apologies &g

Re: Is there a way to develop my own resolver for JSON template layout?

2021-09-19 Thread Volkan Yazıcı
one. > > > > On Fri, Sep 17, 2021 at 3:26 PM Volkan Yazıcı > wrote: > > > Jingguo, I am curious, what kind of a new resolver do you want to > develop? > > If that is something useful for other users, it is good to ship that in > > Log4j by

Re: Is there a way to develop my own resolver for JSON template layout?

2021-09-17 Thread Volkan Yazıcı
Jingguo, I am curious, what kind of a new resolver do you want to develop? If that is something useful for other users, it is good to ship that in Log4j by default. On Mon, Sep 6, 2021 at 8:03 AM jingguo yao wrote: > >

Re: Is there a way to develop my own resolver for JSON template layout?

2021-09-07 Thread Volkan Yazıcı
Yes, there certainly is, though it is targeted for soon-to-be-released 2.15.0 release. If using 2.15.0-SNAPSHOT is an option for you, see the Extending section of the manual .

Re: Filtering packages from stacktrace in

2021-08-30 Thread Volkan Yazıcı
It surely is since 2.14.1 release! See the documentation on exception resolver , in particular, truncation-related configuration knobs. On Sat, Aug 28, 2021 at 10:47 AM Atle Tokle wrote: >

Re: garbagefreeThreadContextMap default

2021-08-05 Thread Volkan Yazıcı
There are various optimizations in Log4j depending on thread locals, including garbage-free context map implementations. Thread locals are known to not get along well with applications running a relatively high number of threads. For one, servlet containers (Tomcat, JBoss, etc.) is a good example

Re: Program hangs when terminating on v14.1

2021-08-02 Thread Volkan Yazıcı
Hello Laurent, Thanks for the report and the reproduction path. Would you be able to hook up a profiler and figure out the thread blocking the exit, please? Kind regards. On Tue, Aug 3, 2021 at 7:54 AM Laurent Hasson wrote: > Hello, > > We use Log4J2 as our logging library both in a Web

Re: Question on accessing the threadcontext in pattern vs lookup

2021-04-10 Thread Volkan Yazıcı
AFAIC, your reasoning on why m:testkey not working is correct. Why don't you create your own PatternConverter rather than using a custom lookup? Additionally, if your log sink accepts JSON, you can introduce a custom resolver to JsonTemplateLayout too -- though note that this feature will be

Re: log pattern - servlet context name with fallback on pid

2021-03-27 Thread Volkan Yazıcı
> > "{${web:servletContextName}" when the servlet name was missing) but using > > your approach I got something that works: > > > > %equals{${web:servletContextName}}{${web:servletContextName}}{%pid} > > > > I wonder if a simpler solution exists though. &

Re: log pattern - servlet context name with fallback on pid

2021-03-26 Thread Volkan Yazıcı
Hello Clement, I am not an expert on *PatternLayout* and lookups, but I think I have a hypothesis about what is going wrong and how you can fix it. *${web:servletContextName:-${sys:user.name }}* lookup works, because the substitute is again a *lookup*. Though

Fwd: Log4j2 JSON template layout help

2021-01-24 Thread Volkan Yazıcı
Hello Anudeep, *[I am moving the conversation to the "users" mailing list. All committers already get notified by the newly created JIRA tickets – unless they have explicitly opted out for. I will appreciate it if you can direct your questions to this mailing list next time.]* Thanks so much for

Re: Stack Traces in JSON Template Layout

2020-12-17 Thread Volkan Yazıcı
Hey Varun! Were you able to figure out the problem? Did you have any progress? On Sun, Dec 13, 2020 at 9:47 PM Volkan Yazıcı wrote: > Varun, would you mind sharing the logger line causing this > problem, please? That is, is it *logger.error("foo", exception)* or > *log

Re: Stack Traces in JSON Template Layout

2020-12-13 Thread Volkan Yazıcı
`root_cause` key not > even show up even with null means something is still broken with the setup. > I'd previosuly see it being populated with root_cause:null with your > logstash layout project when I had it configured via *"error.root_cause": > "${json:exceptionRootCause:mess

Re: Stack Traces in JSON Template Layout

2020-12-11 Thread Volkan Yazıcı
Hello Varun, Thanks for the detailed report. Though I still fail to reproduce the issue. "message" resolver doesn't have an "includeStackTrace" configuration option, though I can see where you are coming from. It is unfortunately a leftover in the documentation. I will fix it in the manual. Your

Re: log4j2 performance issues with Java 11

2020-11-19 Thread Volkan Yazıcı
In the light of what Ralph mentioned about %L pattern, @Lisa, would you mind seeing if simplifying the pattern (that is, removing certain directives bit by bit, e.g., starting with %L) helps? Pinning down the actual smoking gun would help us a lot. On Wed, Nov 18, 2020 at 4:50 PM Ralph Goers

Obtaining LoggerContext without starting it

2020-10-28 Thread Volkan Yazıcı
Hello, I use the following snippet to obtain a LoggerContext out of a config asdasd import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.core.LoggerContext; (LoggerContext) LogManager.getContext( ClassLoader.getSystemClassLoader(), false, configFileUri); Though

Re: Custom JSONLayout

2020-08-14 Thread Volkan Yazıcı
have to. > > Ralph > > > On Aug 14, 2020, at 7:07 AM, Volkan Yazıcı > wrote: > > > > Hello Naz, > > > > [Sorry for my late response.] > > > > I am the author of LogstashLayout and also its successor > JsonTemplateLayout >

Re: Custom JSONLayout

2020-08-14 Thread Volkan Yazıcı
Hello Naz, [Sorry for my late response.] I am the author of LogstashLayout and also its successor JsonTemplateLayout which will be merged into the release-2.x branch of Log4j (hopefully) in a week or two. LogstashLayout **does** support blank value elimination, you just need to set

Re: JsonLayout Configuration

2020-06-30 Thread Volkan Yazıcı
Hello Ayush, As of this moment, there doesn't exist such a configuration knob in JsonLayout, AFAIK. Though the future is bright! There is an external plugin, log4j2-logstash-layout[1], which delivers what you're looking for (see its maxStringLength parameter) and more! The good news is, we are in

Re: Formatting Results

2020-06-18 Thread Volkan Yazıcı
Created LOG4J2-2874[1]. Forwarding the mail to the dev list, let's see what others think about it. Thanks for the report Fred. [1] https://issues.apache.org/jira/browse/LOG4J2-2874 On Wed, Jun 17, 2020 at 7:41 PM Volkan Yazıcı wrote: > > Yes, I guess I am able to reproduce the error.

Re: Formatting Results

2020-06-17 Thread Volkan Yazıcı
o implements StringBuilderFormattable { >@Override >public void formatTo(StringBuilder buffer) { buffer.append("bar"); } > } > ... > final Message em = log.traceEntry(); > ... > log.traceExit("{}", new Foo());// logs the formatTo method [all good]

Re: Formatting Results

2020-06-17 Thread Volkan Yazıcı
Hello Fred, If the Message you pass to traceExit(Message,R) implements StringBuilderFormattable, indeed formatTo(StringBuilder) will be used by the layout for serialization. What do you mean by "this does not seem to be the case"? Would you mind elaborating a bit more on what you're exactly

Re: [ANNOUNCEMENT] Welcome Volkan Yazici

2020-05-17 Thread Volkan Yazıcı
I am speechless, thanks so much Ralph! That means a lot coming from you. I will do my best push the project forward. On Sun, May 17, 2020 at 12:19 AM Ralph Goers wrote: > > > > Hi, > > it is my pleasure to announce to the community that Volkan Yazici has joined > our ranks as a new Committer. >

Re: GCP logging

2020-01-28 Thread Volkan Yazıcı
Yet another happy customer[1]! [1] https://github.com/vy/log4j2-logstash-layout/issues/54#issuecomment-578832994 On Fri, Jan 24, 2020 at 5:37 PM Volkan Yazıcı wrote: > > Yes, as Ralph has noted I am busy with contributing LogstashLayout > into Log4j 2. In the meantime, you can

Re: GCP logging

2020-01-24 Thread Volkan Yazıcı
Yes, as Ralph has noted I am busy with contributing LogstashLayout into Log4j 2. In the meantime, you can still use LogstashLayout. I see that you've already created a ticket[1]. I will investigate the possibility and share the outcome in the ticket. (Maybe even here?) [1]

Re: Non-String values in Thread Context Map (MDC)

2019-11-04 Thread Volkan Yazıcı
context data, all layouts need to know how to Marshall/unmarshall > these objects. I don’t think we want to take on that burden. > > What it boils down to is that I don’t know how easy we want to make this. > > Remko. > > (Shameless plug) Every java main() method deserv

Re: Non-String values in Thread Context Map (MDC)

2019-11-03 Thread Volkan Yazıcı
> >>> See https://issues.apache.org/jira/browse/LOG4J2-1648 for more > details. > >>> > >>> Remko. > >>> > >>> (Shameless plug) Every java main() method deserves http://picocli.info > >>> > >>>>> On Nov 3,

Re: Non-String values in Thread Context Map (MDC)

2019-11-03 Thread Volkan Yazıcı
;> On Nov 3, 2019, at 13:57, Ralph Goers > wrote: > >>> > >> No. Our experience has shown that putting non-String values in > ThreadLocals has to be done very carefully, so to make sure there aren’t > any problems the ThreadContextMap only al

Non-String values in Thread Context Map (MDC)

2019-11-02 Thread Volkan Yazıcı
Hello, LogEvent#getContextData() returns a ReadOnlyStringMap such that the provided get() and forEach() allow non-String values in the entries. That said, ReadOnlyStringMap#toMap() returns a Map. Further, both ThreadContext.put() and ThreadContext.putAll() only allow String values. I am confused

Re: How to configure ObjectMapper of Log4j2 JSON Layout

2019-07-12 Thread Volkan Yazıcı
Hello Dominik, I don't know how you can achieve that using JsonLayout. That said, it sounds like a really valid use case and I have already created a log4j2-logstash-layout ticket for it . I plan to implement it in a couple of weeks and cut

Truncating fields

2019-05-17 Thread Volkan Yazıcı
Hello, A log4j2-logstash-layout user submitted a feature request to truncate individual fields . Even though I can implement such a feature in the plugin itself, I was just wondering if there is a way to suffice this need using default

Re: Announcement: log4j2-logstash-layout v0.15 is released

2018-11-24 Thread Volkan Yazıcı
; new section called "Resources". > > Gary > > On Fri, Nov 23, 2018 at 1:15 PM Volkan Yazıcı > wrote: > > > Hello, > > > > In addition to the JSONLayout > > <https://logging.apache.org/log4j/2.0/manual/layouts.html#JSONLayout> > > sh

Re: Announcement: log4j2-logstash-layout v0.15 is released

2018-11-24 Thread Volkan Yazıcı
icocli.info > > > > > On Nov 24, 2018, at 9:52, Gary Gregory wrote: > > > > > > Hi, > > > > > > You might want to create a PR for > > > https://logging.apache.org/log4j/2.x/articles.html and add your plugin > > to a > > > new se

Announcement: log4j2-logstash-layout v0.15 is released

2018-11-23 Thread Volkan Yazıcı
Hello, In addition to the JSONLayout shipped by default in Log4j 2, there is also another layout plugin that you can render customized JSONs: log4j2-logstash-layout . A couple of

Re: Custom Fields in JsonLayout

2017-05-08 Thread Volkan Yazıcı
Mikael, would you mind checking my comments in the ticket? On Mon, May 8, 2017 at 3:19 PM, Mikael Ståldal <mikael.stal...@magine.com> wrote: > There is a JIRA ticket already: > https://issues.apache.org/jira/browse/LOG4J2-1694 > > On Sat, May 6, 2017 at 7:59 PM, Volkan

Custom Fields in JsonLayout

2017-05-06 Thread Volkan Yazıcı
Hello, In Log4j 2.x, I want to introduce custom fields to JsonLayout via configuration. Is that something doable? Or shall I come back with a JIRA ticket+patch? Best.