You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by EDMONDO SENA <ed...@gmail.com> on 2020/02/19 14:41:55 UTC

org.apache.log4j.Category

Hi Everybody,

org.apache.log4j.Category is not available in Log4j2.

How can we use it in Log4j2?
Must we change all our code?
Can you tell me as implement it in Log4j2?

Kind regards.
//Edmondo.

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


Re: org.apache.log4j.Category

Posted by EDMONDO SENA <ed...@gmail.com>.
I've checked it but nothing is reported for Category log1.x migration,



On 2020/02/19 15:05:29, EDMONDO SENA <ed...@gmail.com> wrote: 
> We use the java code not properties files in this case.
> 
> 
> On 2020/02/19 15:03:16, Matt Sicker <bo...@gmail.com> wrote: 
> > See these pages:
> > 
> > http://logging.apache.org/log4j/2.x/manual/migration.html
> > 
> > http://logging.apache.org/log4j/2.x/manual/compatibility.html
> > 
> > 
> > On Wed, Feb 19, 2020 at 08:41 EDMONDO SENA <ed...@gmail.com> wrote:
> > 
> > > Hi Everybody,
> > >
> > > org.apache.log4j.Category is not available in Log4j2.
> > >
> > > How can we use it in Log4j2?
> > > Must we change all our code?
> > > Can you tell me as implement it in Log4j2?
> > >
> > > Kind regards.
> > > //Edmondo.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > > --
> > Matt Sicker <bo...@gmail.com>
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

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


Re: org.apache.log4j.Category

Posted by EDMONDO SENA <ed...@gmail.com>.
We use the java code not properties files in this case.


On 2020/02/19 15:03:16, Matt Sicker <bo...@gmail.com> wrote: 
> See these pages:
> 
> http://logging.apache.org/log4j/2.x/manual/migration.html
> 
> http://logging.apache.org/log4j/2.x/manual/compatibility.html
> 
> 
> On Wed, Feb 19, 2020 at 08:41 EDMONDO SENA <ed...@gmail.com> wrote:
> 
> > Hi Everybody,
> >
> > org.apache.log4j.Category is not available in Log4j2.
> >
> > How can we use it in Log4j2?
> > Must we change all our code?
> > Can you tell me as implement it in Log4j2?
> >
> > Kind regards.
> > //Edmondo.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> > --
> Matt Sicker <bo...@gmail.com>
> 

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


Re: org.apache.log4j.Category

Posted by Matt Sicker <bo...@gmail.com>.
See these pages:

http://logging.apache.org/log4j/2.x/manual/migration.html

http://logging.apache.org/log4j/2.x/manual/compatibility.html


On Wed, Feb 19, 2020 at 08:41 EDMONDO SENA <ed...@gmail.com> wrote:

> Hi Everybody,
>
> org.apache.log4j.Category is not available in Log4j2.
>
> How can we use it in Log4j2?
> Must we change all our code?
> Can you tell me as implement it in Log4j2?
>
> Kind regards.
> //Edmondo.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
> --
Matt Sicker <bo...@gmail.com>

Re: org.apache.log4j.Category

Posted by Ralph Goers <ra...@dslextreme.com>.
I don’t understand the question. I maven terms it is 

<dependency>
  <groupId>org.apache.logging.log4j</groupId>
  <artifactId>log4j-1.2-api</artifactId>
  <version>2.13.0</version>
</dependency>

Ralph

> On Feb 20, 2020, at 1:00 AM, EDMONDO SENA <ed...@gmail.com> wrote:
> 
> Hi Ralph,
> 
> Can you tell me where Can I loading log4j-1.2-api.jar in Log4j 2?
> 
> Thanks in advance.
> //Edmondo.
> 
> 
> 
> On 2020/02/19 15:39:41, Ralph Goers <ra...@dslextreme.com> wrote: 
>> If you remove the log4j 1.x jar and replace it with the log4j-1.2-api jar from log4j 2 you will pass your security scans as Log4j 1 will no longer be present. But your application code can continue to use the Log4j 1 api when making logging calls. That said, converting the code to use the Log4j 2 API isn’t a bad thing as it is much better but only do it if you have to touch the code anyway.
>> 
>> Ralph
>> 
>>> On Feb 19, 2020, at 8:27 AM, EDMONDO SENA <ed...@gmail.com> wrote:
>>> 
>>> No Ralph because for security problem we have to pass to Log4j2.
>>> Log4j1 will be out.
>>> 
>>> 
>>> On 2020/02/19 15:20:44, Ralph Goers <ra...@dslextreme.com> wrote: 
>>>> I you have code that is using Log4j 1’s Category class and don’t want to change it then just leave it alone and use the log4j-1.2-api jar to provide compatibility for those classes.
>>>> 
>>>> Ralph
>>>> 
>>>>> On Feb 19, 2020, at 7:41 AM, EDMONDO SENA <ed...@gmail.com> wrote:
>>>>> 
>>>>> Hi Everybody,
>>>>> 
>>>>> org.apache.log4j.Category is not available in Log4j2.
>>>>> 
>>>>> How can we use it in Log4j2?
>>>>> Must we change all our code?
>>>>> Can you tell me as implement it in Log4j2?
>>>>> 
>>>>> Kind regards.
>>>>> //Edmondo.
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>>> 
>>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>> 
>>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 



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


Re: org.apache.log4j.Category

Posted by EDMONDO SENA <ed...@gmail.com>.
Hi Ralph,

Can you tell me where Can I loading log4j-1.2-api.jar in Log4j 2?

Thanks in advance.
//Edmondo.

 

On 2020/02/19 15:39:41, Ralph Goers <ra...@dslextreme.com> wrote: 
> If you remove the log4j 1.x jar and replace it with the log4j-1.2-api jar from log4j 2 you will pass your security scans as Log4j 1 will no longer be present. But your application code can continue to use the Log4j 1 api when making logging calls. That said, converting the code to use the Log4j 2 API isn’t a bad thing as it is much better but only do it if you have to touch the code anyway.
> 
> Ralph
> 
> > On Feb 19, 2020, at 8:27 AM, EDMONDO SENA <ed...@gmail.com> wrote:
> > 
> > No Ralph because for security problem we have to pass to Log4j2.
> > Log4j1 will be out.
> > 
> > 
> > On 2020/02/19 15:20:44, Ralph Goers <ra...@dslextreme.com> wrote: 
> >> I you have code that is using Log4j 1’s Category class and don’t want to change it then just leave it alone and use the log4j-1.2-api jar to provide compatibility for those classes.
> >> 
> >> Ralph
> >> 
> >>> On Feb 19, 2020, at 7:41 AM, EDMONDO SENA <ed...@gmail.com> wrote:
> >>> 
> >>> Hi Everybody,
> >>> 
> >>> org.apache.log4j.Category is not available in Log4j2.
> >>> 
> >>> How can we use it in Log4j2?
> >>> Must we change all our code?
> >>> Can you tell me as implement it in Log4j2?
> >>> 
> >>> Kind regards.
> >>> //Edmondo.
> >>> 
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >>> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>> 
> >>> 
> >> 
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >> 
> >> 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

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


Re: org.apache.log4j.Category

Posted by Ralph Goers <ra...@dslextreme.com>.
If you remove the log4j 1.x jar and replace it with the log4j-1.2-api jar from log4j 2 you will pass your security scans as Log4j 1 will no longer be present. But your application code can continue to use the Log4j 1 api when making logging calls. That said, converting the code to use the Log4j 2 API isn’t a bad thing as it is much better but only do it if you have to touch the code anyway.

Ralph

> On Feb 19, 2020, at 8:27 AM, EDMONDO SENA <ed...@gmail.com> wrote:
> 
> No Ralph because for security problem we have to pass to Log4j2.
> Log4j1 will be out.
> 
> 
> On 2020/02/19 15:20:44, Ralph Goers <ra...@dslextreme.com> wrote: 
>> I you have code that is using Log4j 1’s Category class and don’t want to change it then just leave it alone and use the log4j-1.2-api jar to provide compatibility for those classes.
>> 
>> Ralph
>> 
>>> On Feb 19, 2020, at 7:41 AM, EDMONDO SENA <ed...@gmail.com> wrote:
>>> 
>>> Hi Everybody,
>>> 
>>> org.apache.log4j.Category is not available in Log4j2.
>>> 
>>> How can we use it in Log4j2?
>>> Must we change all our code?
>>> Can you tell me as implement it in Log4j2?
>>> 
>>> Kind regards.
>>> //Edmondo.
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>> 
>>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 



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


Re: org.apache.log4j.Category

Posted by EDMONDO SENA <ed...@gmail.com>.
No Ralph because for security problem we have to pass to Log4j2.
Log4j1 will be out.


On 2020/02/19 15:20:44, Ralph Goers <ra...@dslextreme.com> wrote: 
> I you have code that is using Log4j 1’s Category class and don’t want to change it then just leave it alone and use the log4j-1.2-api jar to provide compatibility for those classes.
> 
> Ralph
> 
> > On Feb 19, 2020, at 7:41 AM, EDMONDO SENA <ed...@gmail.com> wrote:
> > 
> > Hi Everybody,
> > 
> > org.apache.log4j.Category is not available in Log4j2.
> > 
> > How can we use it in Log4j2?
> > Must we change all our code?
> > Can you tell me as implement it in Log4j2?
> > 
> > Kind regards.
> > //Edmondo.
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > 
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 

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


Re: org.apache.log4j.Category

Posted by Ralph Goers <ra...@dslextreme.com>.
I you have code that is using Log4j 1’s Category class and don’t want to change it then just leave it alone and use the log4j-1.2-api jar to provide compatibility for those classes.

Ralph

> On Feb 19, 2020, at 7:41 AM, EDMONDO SENA <ed...@gmail.com> wrote:
> 
> Hi Everybody,
> 
> org.apache.log4j.Category is not available in Log4j2.
> 
> How can we use it in Log4j2?
> Must we change all our code?
> Can you tell me as implement it in Log4j2?
> 
> Kind regards.
> //Edmondo.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 
> 



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