Log level settings are not working correctly and getting wrong value

2022-03-07 Thread Pooja Pandey
Hi team, I think there is something wrong with Log4j1.x bridge level handling when migrating from log4j1.x to log4j2.x. Issue: In my config file, log level is set to "Error", but with log4j1.x bridge log level is getting calculated as DEBUG. I think this is since in log4j1.x from FATAL to

RE: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-06 Thread Pooja Pandey
Hi Piotr, I am not building log4j2 1.x bridge jars but downloading the jar directly. I wanted to test with your Pull Request changes, is it possible for you to provide log4j1.x bridge.jar log4j2-core.jar and log4j2-api.jar built with this change ?? -Original Message- From: Piotr P.

RE: Log level settings are not working correctly and getting wrong value

2022-03-07 Thread Pooja Pandey
ong value *** External email: Verify sender before opening attachments or links *** Hello Pooja, On Mon, Mar 7, 2022 at 1:40 PM Pooja Pandey wrote: > > -> If I recall correctly, you are using a custom `Logger` class. My guess is > that you overrode the `getEffectiveLevel()` with some

RE: Log level settings are not working correctly and getting wrong value

2022-03-07 Thread Pooja Pandey
ngs are not working correctly and getting wrong value *** External email: Verify sender before opening attachments or links *** Hello Pooja, On Mon, Mar 7, 2022 at 11:23 AM Pooja Pandey wrote: > I think there is something wrong with Log4j1.x bridge level handling when > migrating from log4j1.x to

Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-04 Thread Pooja Pandey
(final String name) { AppenderWrapper appenderWrapper = (AppenderWrapper) super.getAppender(name); return ((AppenderAdapter.Adapter)appenderWrapper.getAppender()).getAppender(); } Get Outlook for iOS<https://aka.ms/o0ukef> From: Pooja

Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-04 Thread Pooja Pandey
Actually, in first go due to time constraint, we are using log4j bridge instead of direct log4j2 API to migrate our legacy huge code from log4j1 to log4j2. In code we use custom FileAppender When we Logger.getAppender(), it is returning AppenderWrapper now with the bridge. Get Outlook for

Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-05 Thread Pooja Pandey
:50 PM To: Log4J Users List Subject: Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender *** External email: Verify sender before opening attachments or links *** Hi Pooja, On Sat, Mar 5, 2022 at 3:01 AM Pooja Pandey

Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-05 Thread Pooja Pandey
Log4J Users List Subject: Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender *** External email: Verify sender before opening attachments or links *** Hi Pooja, On Sat, Mar 5, 2022 at 1:48 PM Pooja Pandey wrote: >

Re: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-05 Thread Pooja Pandey
r 4, 2022, at 7:00 PM, Pooja Pandey wrote: > > By overriding getAppender in our customLogger, the cast Exception could be > fixed, however we are still having some minor issues in reading property > value but may be this new issue is due to some other problems. I am still &

Re: Log level settings are not working correctly and getting wrong value

2022-03-07 Thread Pooja Pandey
email: Verify sender before opening attachments or links *** Hello, On Mon, Mar 7, 2022 at 3:15 PM Pooja Pandey wrote: > > From the questions you posted up to now, you use a lot of custom code > extending Log4j 1.x capabilities. In my personal opinion you'll spend more > time trying

RE: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-05 Thread Pooja Pandey
I have created below JIRA ticket for the issue I am facing, LOG4J2-3426 Log4j 1.x bridge Logger.getAppender returns a wrapped AppenderAdapter Link -> https://issues.apache.org/jira/browse/LOG4J2-3426 Thanks, Pooja -Original Message- From: Pooja Pandey Sent: Sunday, March 6, 202

RE: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-05 Thread Pooja Pandey
ing the same file either. I’d love to know how you avoided having the file roll multiple times (once for each process). Ralph > On Mar 5, 2022, at 8:10 AM, Pooja Pandey wrote: > > Hi Ralph, > > We needed custom logger long long back when log4j1 logger was not sufficient > to achiev

RE: Log4j1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup

2022-03-08 Thread Pooja Pandey
ath of updating your call sites to the Log4j 2 API. Gary Gary On Tue, Mar 8, 2022, 07:20 Pooja Pandey wrote: > -> What does your Log4j configuration file look like? > > I have figured adding log4j-web.jar into my libs fixes below issue. I > have added following 2 jars as well lo

RE: Log4j1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup

2022-03-08 Thread Pooja Pandey
ile look like? Gary On Tue, Mar 8, 2022, 01:48 Pooja Pandey wrote: > Hi, > > > I am trying to migrate from log4j1.x to log4j2.17.2 using log4j1.x > bridge approach. I am getting below ClassCastException error message. > Please let me know if you have any idea how to fix this.

RE: Log4j1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup

2022-03-08 Thread Pooja Pandey
1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup *** External email: Verify sender before opening attachments or links *** Hi, On Tue, Mar 8, 2022 at 7:48 AM Pooja Pandey wrote: > I am trying to m

RE: Log4j1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup

2022-03-08 Thread Pooja Pandey
ate Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup *** External email: Verify sender before opening attachments or links *** Use the Log4j 2 API instead of Log4j 1. Gary On Tue, Mar 8, 2022, 08:20 Pooja Pandey wrote: > -&g

RE: [External Sender] Re: Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Pooja Pandey
our are doing. Ty, Gary On Wed, Mar 9, 2022, 06:47 Pooja Pandey wrote: > We are using PropertyConfigurator.configure(), but this doesn't work > in log4j1.x bridge. > > > > Please let me know if you have any idea on how to fix it. >

Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-09 Thread Pooja Pandey
We are using PropertyConfigurator.configure(), but this doesn't work in log4j1.x bridge. Please let me know if you have any idea on how to fix it. Thanks, Pooja

Log4j1.x bridge error: Unable to create Lookup for bundle java.lang.ClassCastException: class org.apache.logging.log4j.core.lookup.ResourceBundleLookup

2022-03-07 Thread Pooja Pandey
Hi, I am trying to migrate from log4j1.x to log4j2.17.2 using log4j1.x bridge approach. I am getting below ClassCastException error message. Please let me know if you have any idea how to fix this. 2022-03-08 01:41:17,023 http-nio-8088-exec-9 ERROR Unable to create Lookup for bundle

Re: [External Sender] Re: Alternative to PropertyConfigurator while migrating from log4j1.x to log4j1.x bridge

2022-03-10 Thread Pooja Pandey
operty(ConfigurationFactory.LOG4J1_CONFIGURATION_FILE_PROPERTY, configURL.toString()); System.clearProperty(LOG4J1_MONITOR_INTERVAL); LoggerContext context = LoggerContext.getContext(false); context.setConfigLocation(null); } -Jason From: Pooja Pandey Date: Wednesday, March 9, 2022 at 7:50 PM To: Log4J Users List Subje

java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-04 Thread Pooja Pandey
Hi Team, I am trying to migrate from log4j1.x to log4j2.17.2 using log4j1.x bridge approach. I am getting below ClassCastException error message. Please let me know if you have any idea how to fix this. java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to

java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-04 Thread Pooja Pandey
Hi Team, I am trying to migrate from log4j1.x to log4j2.17.2 using log4j1.x bridge approach. I am getting below ClassCastException error message. Please let me know if you have any idea how to fix this. java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast

RE: java.lang.ClassCastException: org.apache.log4j.bridge.AppenderWrapper cannot be cast to org.apache.log4j.FileAppender

2022-03-04 Thread Pooja Pandey
, 2022, 03:36 Pooja Pandey wrote: > Hi Team, > > > > I am trying to migrate from log4j1.x to log4j2.17.2 using log4j1.x > bridge approach. I am getting below ClassCastException error message. > Please let me know if you have any idea how to fix this. > > >

Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-24 Thread Pooja Pandey
Hi, In our application we have migrated from log4j1.x to log4j1.x bridge. With Log4j1.x there was no issue with multithreading but with log4j 1.x bridge we have noticed that in multithreading environment there is a huge data loss while logging, however single thread works fine. I see that in

RE: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-24 Thread Pooja Pandey
:\\Users\\Pooja.Pandey\\vdrws.log")); writer.write(""); writer.flush(); JavaLoggingMultiThTest javaLoggingMultiThTest = new JavaLoggingMultiThTest(); try { javaLoggingMultiThTest.pid = getCurrrentProcessId(); } catch (Exception e) { e.printStackTrace

RE: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2)

2022-03-24 Thread Pooja Pandey
Attaching sample test program for simulated multithreading logging. From: Pooja Pandey Sent: Friday, March 25, 2022 4:37 AM To: Log4J Users List Subject: Synchronization issue in multithreading (Losing huge data in multithreading) with log4j 1.x bridge (2.17.2) *** External email: Verify

RE: can we set log4j property 'Log4jContextSelector' per webapps war

2022-04-07 Thread Pooja Pandey
do that. Second, putting the property in log4j2.component.properties is correct. However, it must only be on the classpath of the web app that needs it, not in a shared directory. Ralph > On Apr 6, 2022, at 3:25 PM, Pooja Pandey wrote: > > But these other 2 wars already have log4j2 j

RE: can we set log4j property 'Log4jContextSelector' per webapps war

2022-04-07 Thread Pooja Pandey
. we have not planned yet to completely migrate to log4j2 interface due to time constraints and to avoid lot of unknown issues with our huge legacy code. -Original Message- From: Pooja Pandey Sent: Thursday, April 7, 2022 2:16 PM To: Log4J Users List Subject: RE: can we set log4j

can we set log4j property 'Log4jContextSelector' per webapps war

2022-04-06 Thread Pooja Pandey
Hi, In my application, I have 2 processes running and there are 3 webapps war files which get deployed in tomcat version 9.0.60. Out of these 3 war files, one war file is internal to my application while other 2 are coming as final artifacts from artifiactory. My war uses a custom logger and

RE: can we set log4j property 'Log4jContextSelector' per webapps war

2022-04-06 Thread Pooja Pandey
. "java.lang.ClassCastException: Cannot cast logger.log4j2.CustomLog4j2ContextSelector to org.apache.logging.log4j.core.selector.ContextSelector". -Original Message----- From: Pooja Pandey Sent: Wednesday, April 6, 2022 7:04 PM To: Log4J Users List Subject: can we set log4

Re: can we set log4j property 'Log4jContextSelector' per webapps war

2022-04-06 Thread Pooja Pandey
hments or links *** Where are the Log4j jars located? Ralph > On Apr 6, 2022, at 6:34 AM, Pooja Pandey wrote: > > Hi, > > In my application, I have 2 processes running and there are 3 webapps war > files which get deployed in tomcat version 9.0.60. Out of these 3 war files, &g

Re: can we set log4j property 'Log4jContextSelector' per webapps war

2022-04-06 Thread Pooja Pandey
j jars then you can only have a single ContextSelector. Ralph > On Apr 6, 2022, at 11:17 AM, Pooja Pandey > wrote: > > Webapps wars path is like: installation directory/soa-dir/webapps/ > > Along with various other product libs, log4j2 jars and log4j2 propertie file > a