You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Ralph Goers <ra...@dslextreme.com> on 2017/09/06 18:49:51 UTC

Log4j support for Tomcat, TomEE, JBoss, etc.

On the commons list I got some pointers on how to integrate with Tomcat 8.5+ and TomEE. I’ve written the class that is required but am wondering where to put it. It could go in log4j-core, but that isn’t where we have been putting these things. It really shouldn’t go in log4j-web as users may not want that jar just to get the integration with log4j. 

I am thinking a new module should be created for this - something like log4j-containers. If I do that does it belong in log4j2 or in log4j-tools, log4j-boot or some other repo?

Ralph

Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Apache <ra...@dslextreme.com>.
I created a Log4J-appserver module and added the Tomcat support there. I took a look at jetty and it supports Log4J by routing it through slf4j. I'd like to change that but I am not too familiar with the internals of jetty so that might take a bit.

Ralph

> On Sep 7, 2017, at 4:47 AM, Mikael Ståldal <mi...@apache.org> wrote:
> 
> But is it more generic than JavaEE? If not, a generic name is misleading.
> 
> 
>> On 2017-09-07 00:07, Remko Popma wrote:
>> log4j-container?
>> (To be more generic than javaee)
>>> On Sep 7, 2017, at 4:56, Ralph Goers <ra...@dslextreme.com> wrote:
>>> 
>>> Yes, the intent would be to allow containers to use Log4j as their logging implementation.
>>> 
>>> Ralph
>>> 
>>>> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
>>>> 
>>>> Is the point to integrate with JavaEE containers, not necessarily from a web app?
>>>> 
>>>> Then I would suggest a new module log4j-javaee, and to put it in the main repo.
>>>> 
>>>> 
>>>>> On 2017-09-06 20:49, Ralph Goers wrote:
>>>>> On the commons list I got some pointers on how to integrate with Tomcat 8.5+ and TomEE. I’ve written the class that is required but am wondering where to put it. It could go in log4j-core, but that isn’t where we have been putting these things. It really shouldn’t go in log4j-web as users may not want that jar just to get the integration with log4j.
>>>>> I am thinking a new module should be created for this - something like log4j-containers. If I do that does it belong in log4j2 or in log4j-tools, log4j-boot or some other repo?
>>>> 
>>> 
>>> 
> 
> 



Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Mikael Ståldal <mi...@apache.org>.
But is it more generic than JavaEE? If not, a generic name is misleading.


On 2017-09-07 00:07, Remko Popma wrote:
> log4j-container?
> (To be more generic than javaee)
> 
> 
>> On Sep 7, 2017, at 4:56, Ralph Goers <ra...@dslextreme.com> wrote:
>>
>> Yes, the intent would be to allow containers to use Log4j as their logging implementation.
>>
>> Ralph
>>
>>> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
>>>
>>> Is the point to integrate with JavaEE containers, not necessarily from a web app?
>>>
>>> Then I would suggest a new module log4j-javaee, and to put it in the main repo.
>>>
>>>
>>>> On 2017-09-06 20:49, Ralph Goers wrote:
>>>> On the commons list I got some pointers on how to integrate with Tomcat 8.5+ and TomEE. I’ve written the class that is required but am wondering where to put it. It could go in log4j-core, but that isn’t where we have been putting these things. It really shouldn’t go in log4j-web as users may not want that jar just to get the integration with log4j.
>>>> I am thinking a new module should be created for this - something like log4j-containers. If I do that does it belong in log4j2 or in log4j-tools, log4j-boot or some other repo?
>>>
>>
>>
> 


Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Ralph Goers <ra...@dslextreme.com>.
That was more or less my thought.

In the main repo or a different one?

Ralph

> On Sep 6, 2017, at 3:07 PM, Remko Popma <re...@gmail.com> wrote:
> 
> log4j-container?
> (To be more generic than javaee)
> 
> 
>> On Sep 7, 2017, at 4:56, Ralph Goers <ra...@dslextreme.com> wrote:
>> 
>> Yes, the intent would be to allow containers to use Log4j as their logging implementation.
>> 
>> Ralph
>> 
>>> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
>>> 
>>> Is the point to integrate with JavaEE containers, not necessarily from a web app?
>>> 
>>> Then I would suggest a new module log4j-javaee, and to put it in the main repo.
>>> 
>>> 
>>>> On 2017-09-06 20:49, Ralph Goers wrote:
>>>> On the commons list I got some pointers on how to integrate with Tomcat 8.5+ and TomEE. I’ve written the class that is required but am wondering where to put it. It could go in log4j-core, but that isn’t where we have been putting these things. It really shouldn’t go in log4j-web as users may not want that jar just to get the integration with log4j.
>>>> I am thinking a new module should be created for this - something like log4j-containers. If I do that does it belong in log4j2 or in log4j-tools, log4j-boot or some other repo?
>>> 
>> 
>> 
> 



Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Ralph Goers <ra...@dslextreme.com>.
I would expect all the dependencies to be marked as “provided” so it shouldn’t matter if they are all together.

Ralph


> On Sep 6, 2017, at 4:10 PM, Remko Popma <re...@gmail.com> wrote:
> 
> I guess it depends on what dependencies this module requires. 
> 
> If this module requires Tomcat dependencies then perhaps  log4j-tomcat is better because another container wouldn't want to drag in the Tomcat dependencies. 
> 
> If there's no dependency on any specific container or on any javaEE jars I'd keep it to generic container and split further when appropriate...
> 
> About the repo, this may be a good candidate for moving outside the main repo to speed up the build. Update/release frequency may differ from the main releases.  
> Maybe log4j-tools?
> 
> One thing about the separate repos is that integration is still incomplete. Is the log4j-tools site published? It's not referenced from the Log4j2 site. Also we should link to the log4j-tools artifacts from the main Download page. 
> 
> Remko 
> 
> (Shameless plug) Every java main() method deserves http://picocli.info
> 
>> On Sep 7, 2017, at 7:39, Gary Gregory <ga...@gmail.com> wrote:
>> 
>> The word container is so vague... container of what? Files, Applications,
>> NoSQL things? How about app-container?
>> 
>> Gary
>> 
>>> On Wed, Sep 6, 2017 at 4:07 PM, Remko Popma <re...@gmail.com> wrote:
>>> 
>>> log4j-container?
>>> (To be more generic than javaee)
>>> 
>>> 
>>>> On Sep 7, 2017, at 4:56, Ralph Goers <ra...@dslextreme.com> wrote:
>>>> 
>>>> Yes, the intent would be to allow containers to use Log4j as their
>>> logging implementation.
>>>> 
>>>> Ralph
>>>> 
>>>>> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
>>>>> 
>>>>> Is the point to integrate with JavaEE containers, not necessarily from
>>> a web app?
>>>>> 
>>>>> Then I would suggest a new module log4j-javaee, and to put it in the
>>> main repo.
>>>>> 
>>>>> 
>>>>>> On 2017-09-06 20:49, Ralph Goers wrote:
>>>>>> On the commons list I got some pointers on how to integrate with
>>> Tomcat 8.5+ and TomEE. I’ve written the class that is required but am
>>> wondering where to put it. It could go in log4j-core, but that isn’t where
>>> we have been putting these things. It really shouldn’t go in log4j-web as
>>> users may not want that jar just to get the integration with log4j.
>>>>>> I am thinking a new module should be created for this - something like
>>> log4j-containers. If I do that does it belong in log4j2 or in log4j-tools,
>>> log4j-boot or some other repo?
>>> 
> 



Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Remko Popma <re...@gmail.com>.
I guess it depends on what dependencies this module requires. 

If this module requires Tomcat dependencies then perhaps  log4j-tomcat is better because another container wouldn't want to drag in the Tomcat dependencies. 

If there's no dependency on any specific container or on any javaEE jars I'd keep it to generic container and split further when appropriate...

About the repo, this may be a good candidate for moving outside the main repo to speed up the build. Update/release frequency may differ from the main releases.  
Maybe log4j-tools?

One thing about the separate repos is that integration is still incomplete. Is the log4j-tools site published? It's not referenced from the Log4j2 site. Also we should link to the log4j-tools artifacts from the main Download page. 

Remko 

(Shameless plug) Every java main() method deserves http://picocli.info

> On Sep 7, 2017, at 7:39, Gary Gregory <ga...@gmail.com> wrote:
> 
> The word container is so vague... container of what? Files, Applications,
> NoSQL things? How about app-container?
> 
> Gary
> 
>> On Wed, Sep 6, 2017 at 4:07 PM, Remko Popma <re...@gmail.com> wrote:
>> 
>> log4j-container?
>> (To be more generic than javaee)
>> 
>> 
>>> On Sep 7, 2017, at 4:56, Ralph Goers <ra...@dslextreme.com> wrote:
>>> 
>>> Yes, the intent would be to allow containers to use Log4j as their
>> logging implementation.
>>> 
>>> Ralph
>>> 
>>>> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
>>>> 
>>>> Is the point to integrate with JavaEE containers, not necessarily from
>> a web app?
>>>> 
>>>> Then I would suggest a new module log4j-javaee, and to put it in the
>> main repo.
>>>> 
>>>> 
>>>>> On 2017-09-06 20:49, Ralph Goers wrote:
>>>>> On the commons list I got some pointers on how to integrate with
>> Tomcat 8.5+ and TomEE. I’ve written the class that is required but am
>> wondering where to put it. It could go in log4j-core, but that isn’t where
>> we have been putting these things. It really shouldn’t go in log4j-web as
>> users may not want that jar just to get the integration with log4j.
>>>>> I am thinking a new module should be created for this - something like
>> log4j-containers. If I do that does it belong in log4j2 or in log4j-tools,
>> log4j-boot or some other repo?
>> 

Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Gary Gregory <ga...@gmail.com>.
The word container is so vague... container of what? Files, Applications,
NoSQL things? How about app-container?

Gary

On Wed, Sep 6, 2017 at 4:07 PM, Remko Popma <re...@gmail.com> wrote:

> log4j-container?
> (To be more generic than javaee)
>
>
> > On Sep 7, 2017, at 4:56, Ralph Goers <ra...@dslextreme.com> wrote:
> >
> > Yes, the intent would be to allow containers to use Log4j as their
> logging implementation.
> >
> > Ralph
> >
> >> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
> >>
> >> Is the point to integrate with JavaEE containers, not necessarily from
> a web app?
> >>
> >> Then I would suggest a new module log4j-javaee, and to put it in the
> main repo.
> >>
> >>
> >>> On 2017-09-06 20:49, Ralph Goers wrote:
> >>> On the commons list I got some pointers on how to integrate with
> Tomcat 8.5+ and TomEE. I’ve written the class that is required but am
> wondering where to put it. It could go in log4j-core, but that isn’t where
> we have been putting these things. It really shouldn’t go in log4j-web as
> users may not want that jar just to get the integration with log4j.
> >>> I am thinking a new module should be created for this - something like
> log4j-containers. If I do that does it belong in log4j2 or in log4j-tools,
> log4j-boot or some other repo?
> >>
> >
> >
>

Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Remko Popma <re...@gmail.com>.
log4j-container?
(To be more generic than javaee)


> On Sep 7, 2017, at 4:56, Ralph Goers <ra...@dslextreme.com> wrote:
> 
> Yes, the intent would be to allow containers to use Log4j as their logging implementation.
> 
> Ralph
> 
>> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
>> 
>> Is the point to integrate with JavaEE containers, not necessarily from a web app?
>> 
>> Then I would suggest a new module log4j-javaee, and to put it in the main repo.
>> 
>> 
>>> On 2017-09-06 20:49, Ralph Goers wrote:
>>> On the commons list I got some pointers on how to integrate with Tomcat 8.5+ and TomEE. I’ve written the class that is required but am wondering where to put it. It could go in log4j-core, but that isn’t where we have been putting these things. It really shouldn’t go in log4j-web as users may not want that jar just to get the integration with log4j.
>>> I am thinking a new module should be created for this - something like log4j-containers. If I do that does it belong in log4j2 or in log4j-tools, log4j-boot or some other repo?
>> 
> 
> 

Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Ralph Goers <ra...@dslextreme.com>.
Yes, the intent would be to allow containers to use Log4j as their logging implementation.

Ralph

> On Sep 6, 2017, at 12:26 PM, Mikael Ståldal <mi...@apache.org> wrote:
> 
> Is the point to integrate with JavaEE containers, not necessarily from a web app?
> 
> Then I would suggest a new module log4j-javaee, and to put it in the main repo.
> 
> 
> On 2017-09-06 20:49, Ralph Goers wrote:
>> On the commons list I got some pointers on how to integrate with Tomcat 8.5+ and TomEE. I’ve written the class that is required but am wondering where to put it. It could go in log4j-core, but that isn’t where we have been putting these things. It really shouldn’t go in log4j-web as users may not want that jar just to get the integration with log4j.
>> I am thinking a new module should be created for this - something like log4j-containers. If I do that does it belong in log4j2 or in log4j-tools, log4j-boot or some other repo?
> 



Re: Log4j support for Tomcat, TomEE, JBoss, etc.

Posted by Mikael Ståldal <mi...@apache.org>.
Is the point to integrate with JavaEE containers, not necessarily from a 
web app?

Then I would suggest a new module log4j-javaee, and to put it in the 
main repo.


On 2017-09-06 20:49, Ralph Goers wrote:
> On the commons list I got some pointers on how to integrate with Tomcat 8.5+ and TomEE. I’ve written the class that is required but am wondering where to put it. It could go in log4j-core, but that isn’t where we have been putting these things. It really shouldn’t go in log4j-web as users may not want that jar just to get the integration with log4j.
> 
> I am thinking a new module should be created for this - something like log4j-containers. If I do that does it belong in log4j2 or in log4j-tools, log4j-boot or some other repo?