Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-18 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2004683273 > I understand your example but I am not sure how it works in practice. I have to presume that the Connection class can operate on multiple Connection instances. A Logg

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-18 Thread via GitHub
rgoers commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2004657515 @rocketraman I understand your example but I am not sure how it works in practice. I have to presume that the Connection class can operate on multiple Connection instances.

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-18 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2004452537 > OK. Personally, I see little value in adding context data to a logger. That simply wouldn't fit with any use cases I work with. However, it might if Logger names were

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-18 Thread via GitHub
rgoers commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2004436472 OK. Personally, I see little value in adding context data to a logger. That simply wouldn't fit with any use cases I work with. However, it might if Logger names were more

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-18 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2004426105 > Again, I don't understand. ScopedContext IS a builder. Its a builder for the context. I was talking about a builder for the logger. The thread that @ppkarwasz s

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-18 Thread via GitHub
ppkarwasz commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2003349991 I think we should discuss it in `dev@logging`. I started a [thread dedicated to this subject](https://lists.apache.org/thread/ossk8ckz4yy59z88l8hhbb3k87hbbk0r). -- Thi

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-17 Thread via GitHub
rgoers commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2002582832 @rocketraman Again, I don't understand. ScopedContext IS a builder. Each where method adds a new key/value pair to the context. The run and call methods are, in essence, the

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-17 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2002565293 @rgoers Yes, in my original post I proposed a method `withContextMap` that would be used in Kotlin the same way as `ScopedContext` (though its a bit nicer in Kotlin).

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-17 Thread via GitHub
rgoers commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2002548717 @rocketraman I guess I am not grasping at all what you want. With my PR you can now do: ``` class T { private static final Logger log = LogManger.getLogger(T.

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-17 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2002452904 @rgoers I think you missed the class-scoped (*not* thread-scoped) context in my example. @ppkarwasz Ah interesting -- if I could bind `Property` dynamically then

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-17 Thread via GitHub
ppkarwasz commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-2002375125 > If you look back at my example, logging in `R` is not (only) _thread-scoped_, it is both _thread-scoped_ AND _class-scoped_. In other words, I want all logging in `R` t

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-14 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-1998067762 I think the ideal solution for this would look something like this, and could leverage the solution we come up with for https://github.com/apache/logging-log4j-kotlin/i

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-14 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-1998055009 > Am I missing something? @vy Yes, I think so. Or I am :-) If you look back at my example, logging in `R` is not (only) *thread-scoped*, it is both *thread

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-14 Thread via GitHub
vy commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-1997814563 @rocketraman, AFAIC, the problem is the lack of a dynamically scoped variable (you might be familiar with this concept if you have ever used a Lisp dialect), and hence, we use t

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-14 Thread via GitHub
rocketraman commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-1997613964 > I think this is related to [[apache/logging-log4j2#2213](https://github.com/apache/logging-log4j2/issues/2213)]. @vy It seems so, but I'm unsatisfied by the an

Re: [I] Improve logging context integration [logging-log4j-kotlin]

2024-03-14 Thread via GitHub
vy commented on issue #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71#issuecomment-1997010610 I think this is related to [apache/logging-log4j2#2213]. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use

[I] Improve logging context integration [logging-log4j-kotlin]

2024-03-13 Thread via GitHub
rocketraman opened a new issue, #71: URL: https://github.com/apache/logging-log4j-kotlin/issues/71 Using log4j2 context kind of sucks. The assumption that context will always be set at the Thread or coroutine level is IMO false, and sometimes we just want to set context for a particular blo