Re: JPMS Native Log4j?

2022-10-14 Thread Ralph Goers



> On Oct 14, 2022, at 8:53 AM, Piotr P. Karwasz  wrote:
> 
> Hi Clayton,
> 
> On Fri, 14 Oct 2022 at 17:32, Clayton Wohl  wrote:
>> 
>> I've heard rumors that the log4j devs are working on a Java 11+ JPMS native
>> version of log4j. This would help end users use jlink to package/distribute
>> their applications. Is this still happening? Is there a ballpark time
>> frame for when we will see pre-release builds?
> 
> The upcoming 3.x series will fully support JPMS. See the `master`
> branch: https://github.com/apache/logging-log4j2/tree/master
> 
> While it is now our main development effort and snapshots are
> published regularly (on
> https://repository.apache.org/content/groups/snapshots) after each
> commit, it is not very well tested by the community. JPMS-savy
> contributors are always welcome.

I think Piotr’s statement should be qualified. Currently, many modules are 
fully 
compliant JPMS modules in master. However there are still many that are not. 
It isn’t clear to me how many of the others are really worth the effort of 
doing 
(and it is a large amount of effort).

As for a timeframe. Here are the items still left on the list:
1. Finish modularizing any remaining Maven modules that make sense to do.
2. If at all possible, implement 
https://cwiki.apache.org/confluence/display/LOGGING/Properties+Enhancement
3. Ensure fixes included in release-2.x have not been lost in master.

While item 1 is straightforward, it is still a bit of busy work. Items 2 and 3 
however 
are quite a bit of work. To be honest, I would have liked for 3.0.0-alpha1 to 
have 
been released months ago but there aren’t enough hours in the day. So if you 
can 
provide help by providing PRs for any of these it would be appreciated.


Ralph
-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: JPMS Native Log4j?

2022-10-14 Thread Piotr P. Karwasz
Hi Clayton,

On Fri, 14 Oct 2022 at 17:32, Clayton Wohl  wrote:
>
> I've heard rumors that the log4j devs are working on a Java 11+ JPMS native
> version of log4j. This would help end users use jlink to package/distribute
> their applications. Is this still happening? Is there a ballpark time
> frame for when we will see pre-release builds?

The upcoming 3.x series will fully support JPMS. See the `master`
branch: https://github.com/apache/logging-log4j2/tree/master

While it is now our main development effort and snapshots are
published regularly (on
https://repository.apache.org/content/groups/snapshots) after each
commit, it is not very well tested by the community. JPMS-savy
contributors are always welcome.

Piotr

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



JPMS Native Log4j?

2022-10-14 Thread Clayton Wohl
I've heard rumors that the log4j devs are working on a Java 11+ JPMS native
version of log4j. This would help end users use jlink to package/distribute
their applications. Is this still happening? Is there a ballpark time
frame for when we will see pre-release builds?


Re: Issue after moving to log4j 2.19

2022-10-14 Thread Piotr P. Karwasz
Hi Joan,

> After making a lot of tests trying to get this working again, we had to 
> change the line below:
>
> this.systemLog = LogManager.getLogger("LOGGER_SYSTEM");
>
>  �
>
> By this:
>
> this.systemLog = LogManager.getContext().getLogger("LOGGER_SYSTEM");

This looks like a `LoggerContextSelector` problem:
https://logging.apache.org/log4j/2.x/manual/extending.html#ContextSelector

`LogManager.getContext()` should not be used, because it gives you the
wrong logger context most of the time.
 The automatic configuration uses `LogManager.getContext(false)` to
retrieve the right logger context.

Can you run your application with `-Dlog4j2.debug=true` and share the output?

Piotr

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org