org.apache.log4j.Category

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

org.apache.log4j.Category

EDMONDO SENA
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

Matt Sicker
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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> --
Matt Sicker <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

EDMONDO SENA
We use the java code not properties files in this case.


On 2020/02/19 15:03:16, Matt Sicker <[hidden email]> 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 <[hidden email]> 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: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> > --
> Matt Sicker <[hidden email]>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

EDMONDO SENA
I've checked it but nothing is reported for Category log1.x migration,



On 2020/02/19 15:05:29, EDMONDO SENA <[hidden email]> wrote:

> We use the java code not properties files in this case.
>
>
> On 2020/02/19 15:03:16, Matt Sicker <[hidden email]> 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 <[hidden email]> 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: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > > --
> > Matt Sicker <[hidden email]>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

Ralph Goers
In reply to this post by EDMONDO SENA
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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

EDMONDO SENA
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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

Ralph Goers
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

EDMONDO SENA
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
> >>> For additional commands, e-mail: [hidden email]
> >>>
> >>>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: org.apache.log4j.Category

Ralph Goers
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]