Re: Change semantics of `Throwable` parameters

2023-11-24 Thread Matt Sicker
I’ll note that MessageSupplier is deprecated, and we eventually added support 
for Supplier, so that’s already there. Since it sounds like we have 
some good ideas on what a minimal v3.Logger API would look like, it would be 
cool if anyone would like to propose a full API. Here’s another Logger API to 
consider (from OpenTelemetry, something I’ve been considering for future 
integration purposes, though this might be mostly on the Flume side of things): 
https://javadoc.io/doc/io.opentelemetry/opentelemetry-api-logs/latest/io/opentelemetry/api/logs/LogRecordBuilder.html
 (their Logger returns this builder class).
—
Matt Sicker

> On Nov 23, 2023, at 03:31, Piotr P. Karwasz  wrote:
> 
> Hi Matt,
> 
> On Tue, 21 Nov 2023 at 23:22, Matt Sicker  wrote:
>> 
>> This sounds like it might be a good basis for figuring out a parallel v3 API 
>> for a “hard to mis-use” style API. However, once you go that route, you 
>> start to wonder how useful templated log messages are when you can capture a 
>> lambda instead. Parameterized log messages might work better as structured 
>> log messages, something that is awkward to use in the API at the moment.
> 
> If we'll create a separate `v3.Logger` interface I would clean it up
> from many methods, e.g.:
> 
> * getLevel() and getName(): how are these useful for the user? An `if
> (logger.getLevel() == Level.INFO)` should be replaced by `isEnabled`,
> * getMessageFactory() and getFlowMessageFactory() (the latter is my
> fault): again these are not useful to the user. If I need a message
> factory, it will be a different message factory,
> * printf(): a better approach is to use StringFormatterMessageFactory
> for the logger,
> * catching(Throwable): can be replaced with `error(Object)` and the
> semantics described in this thread,
> * throwing: does anybody use it? Maybe it could stay,
> * entry/exit, traceEntry/traceExit: I can not imagine using these on
> each method (or important method). I'd rather use AspectJ pointcuts
> instead (or a @LogTrace annotation),
> * methods that use `MessageSupplier` like `info(MessageSupplier)`:
> couldn't these be integrated into the logic of `info(Supplier)`?
> * the `is*Enabled` methods are prone to misuse: a snippet like:
> 
> if (logger.isDebugEnabled()) {
>  logger.debug(MARKER, "Hello world!");
> }
> 
> will not print any message if the level of the logger is less specific
> than DEBUG, even if the user asks for **all** MARKER messages to be
> printed.
> 
> IMHO opinion `v3.AbstractLogger` should only have 2 abstract methods:
> * logMessage(Level level, Marker marker, String fqcn,
> StackTraceElement location, Message message, Throwable throwable)
> * isEnabled(Level level, Marker marker, String fqcn,
> StackTraceElement location, Message message, Throwable throwable)
> 
> Piotr



Re: Disable new issues in JIRA

2023-11-24 Thread Matt Sicker
I’d like it if we could copy over open issues to GH.
—
Matt Sicker

> On Nov 24, 2023, at 07:12, Piotr P. Karwasz  wrote:
> 
> Hi all,
> 
> Since we switched to Github Issues, I rarely look at JIRA any more and
> certainly I do not expect to see new issues being posted there.
> 
> Should we ask INFRA to disable issue creation on JIRA for LOG4J2? Do
> we need a vote for that?
> 
> Piotr



Re: Disable new issues in JIRA

2023-11-24 Thread Piotr P. Karwasz
Hi Ralph,

On Fri, 24 Nov 2023 at 16:50, Ralph Goers  wrote:
>
> We should NOT be creating new Jira issues. But locking down Jira completely 
> would mean we would have to somehow transfer any active issues to GitHub. 
> When that happens I would expect the Jira issue to link to the GitHub issue 
> and vice versa as I would not expect all the Jira content and history to be 
> copied to GitHub.

We are not creating new JIRA issues, but users are. What I would try
to achieve is to disable creating new issues, but at the same time
keep the other issues editable.

Of course, if the issue require a longer discussion, I would transfer
them to Github by providing links on both sides.

Piotr


Re: Disable new issues in JIRA

2023-11-24 Thread Ralph Goers
We should NOT be creating new Jira issues. But locking down Jira completely 
would mean we would have to somehow transfer any active issues to GitHub. When 
that happens I would expect the Jira issue to link to the GitHub issue and vice 
versa as I would not expect all the Jira content and history to be copied to 
GitHub.

Ralph

> On Nov 24, 2023, at 8:12 AM, Piotr P. Karwasz  wrote:
> 
> Hi all,
> 
> Since we switched to Github Issues, I rarely look at JIRA any more and
> certainly I do not expect to see new issues being posted there.
> 
> Should we ask INFRA to disable issue creation on JIRA for LOG4J2? Do
> we need a vote for that?
> 
> Piotr



Disable new issues in JIRA

2023-11-24 Thread Piotr P. Karwasz
Hi all,

Since we switched to Github Issues, I rarely look at JIRA any more and
certainly I do not expect to see new issues being posted there.

Should we ask INFRA to disable issue creation on JIRA for LOG4J2? Do
we need a vote for that?

Piotr