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

2022-03-04 Thread Tushar Kapila
You might need to activate login debug and then should see the stack trace. Can search the web on ho to. On Fri, Mar 4, 2022, 21:00 Gary Gregory wrote: > Print copy and paste your stack trace in this email thread. > Then it will be clearer if it is simple for me to reproduce in a unit test > or

Re: Configuring Tomcat to use log4j2 - not working, probably a trivial error in log4j2.xml

2022-01-06 Thread Tushar Kapila
Fyi You need to create tomcat folder, bin/setenv.bat on windows or sh on Linux https://stackoverflow.com/questions/9480210/tomcat-7-setenv-sh-is-not-found On Fri, 7 Jan, 2022, 04:28 Bruno Melloni, wrote: > Success! > > The issue turned out to be that placing the log4j2 jars and > log4j2-tomcat.x

Re: Log4j issue

2021-12-20 Thread Tushar Kapila
Exact plain string (Non regex) to search would be "${ctx" "somekey" is a placeholder for name of variable. On Mon, 20 Dec, 2021, 16:29 , wrote: > I searched ${ctx:somekey} in the log4j-config.xsd file but could not > find anything . > Is that means that is enough If we upgrade to 2.17 or just r

Re: [OT] How do I determine which hardware device and software has log4j security vulnerability?

2021-12-19 Thread Tushar Kapila
Because a patch is out. zero-day vulnerability is *a vulnerability in a system or device that has been disclosed but is not yet patched*. An exploit that attacks a zero-day vulnerability is called a zero-day exploit. ... Vulnerable systems are exposed until a patch is issued by the vendor. >From

Re: log event pojo from log file/ parse file back to log event

2018-02-03 Thread Tushar Kapila
g) Every java main() method deserves http://picocli.info > > > On Feb 3, 2018, at 9:16, Tushar Kapila wrote: > > > > App A uses log4j2 logs to files. It's not too much data. I want to do > what > > chain saw does but without the UI. I want to read the log file. Get

Re: log event pojo from log file/ parse file back to log event

2018-02-02 Thread Tushar Kapila
18, at 2:58 PM, Ralph Goers > wrote: > > > > You would want to create an Appender that publishes to registered > listeners. Log4j currently doesn’t have one but it would be pretty simple > to create one. > > > > Ralph > > > >> On Feb 2, 2018, at 6:09

log event pojo from log file/ parse file back to log event

2018-02-02 Thread Tushar Kapila
logRecord.getThread() logRecord.getLevel(); logRecord.getMessage() ; //could be multiline too,etc -- Regards Tushar Kapila

Re: Issue with Tomcat auto-redeploy on Windows.

2013-04-17 Thread Tushar Kapila
* why would a lib log4j or any other read its own jar? unless its to get to a xml for config in it and is not closing it? * i would never install to program files as there are permission issues on those folders especially with windows 7 try install on c:\apps\ (make apps as a new folder) On

Re: Problems with FileoverAppender

2013-03-27 Thread Tushar Kapila
Could we have a decorated socket that allows listeners to know its buffer status and exposes a method to flush? Then the appender could use that On 3/27/2013 9:27 PM, Ralph Goers wrote: Unfortunately, the appender has no idea how much data is being buffered as the buffer is managed by the Soc

Re: thread debug level

2013-03-14 Thread Tushar Kapila
it would be nice to have thread debug level. why? we have 80% code that is shared in one data center by 25 customers. now when we make changes that affect at most 2-3 customers or add a new one, its nice to have more debug for that customer. most of our classes are multi customer and the only

Re: Is logging operation blocking or nonblocking?

2013-01-04 Thread Tushar Kapila
t;> Of course, every choice you make comes with tradeoffs. For example, using >> an asynchronous approach will mean some loss of reliability. It would be >> better to understand just what your needs are before making any >> recommendations. >> >> Ralph >>

Re: Using FileAppender - Unable to log to a file

2012-11-13 Thread Tushar Kapila
list archive at Nabble.com. > > ----- > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org > For additional commands, e-mail: log4j-user-h...@logging.apache.org > > -- Sent from my mobile device Regards Tushar Kapila - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org

Re: logging parallel threads

2012-10-13 Thread Tushar Kapila
quot; not "a history of events". The > latter fits a logging problem, the former does not. So I would say > log4j is probably not the right tool given your problem description. > Maybe if you restructure the problem it could simplify things for you? > > That said, log4j

Re: RollingFileAppender vs CompositeRollingAppender

2012-10-05 Thread Tushar Kapila
can you put a Class.forName("org.apache.log4j.CompositeRollingAppender") before any logging starts maybe a test app with main with the same classpath maybe the log4j jar is sealed (manifest entry http://docs.oracle.com/javase/tutorial/deployment/jar/sealman.html ) On 10/6/2012 12:04 AM, Pra

Re: log4j2 getting started & rolling files

2012-08-30 Thread Tushar Kapila
${sd:type}.%i.log.gz"> > >> > >> %d %p %C [%t] %m%n > >> > >> > >> > >> > >> > >> > >> > >> > >> > >>

log4j2 getting started & rolling files

2012-08-29 Thread Tushar Kapila
jars that you can get from http://logging.apache.org/log4j/2.x/ if the site does not open try after an hour ... :) might be down for temporary maintenance. Regards Tushar Kapila

Re: unable to set properties

2012-05-07 Thread Tushar Kapila
og4j:WARN Please set a rolling policy for the RollingFileAppender named > 'request' > log4j:ERROR No output stream or file set for the appender named [request]. > > There is some problem with setting the properties in log4j. > > Thanks. -- Regards Tushar Kapila

Re: redirecting Stdout and stderr to a different log file

2012-01-17 Thread Tushar Kapila
You could and should try to pipe out error and std out But at same time look at declaring a logger in each file and find replace system. with logger... calls :) that would make for cleaner logging and with the other options of log4j like controlling which classes are in debug or error mode, etc. /

Re: How do I hook in before log4j starts?

2011-07-18 Thread Tushar Kapila
Can try - When your app start make sure the first class that runs does not have a log4j instance member or other reference to log4j besides the repository call. Use system out till then. On 7/19/11, Turner, Jay wrote: > I call my Library Jar which has log4j setup in it. I'm calling a static > met

Re: Time and Size based rolling (using log4j companions extras)

2011-07-06 Thread Tushar Kapila
Add hour and minute to file name pattern On 7/5/11, Olivier Jaquemet wrote: > Hi, > > I am trying to get log4j to roll log file on a timely basis (weekly), > while also splitting log files which grow too big. > Exactly the same thing provided in logback through SizeAndTimeBasedFNATP : > http://lo

Re: set the placeholder in the log4j.properties file

2010-12-30 Thread Tushar Kapila
I think for most apps you would want all logs to go to file so you can see start up exceptions. Only place you might not mind missing this is when no app specific common code runs before this servlet inits. So my advice is customize the log4j xml in file system per install. That way all logs will b

Re: allow level scheduling

2010-12-07 Thread Tushar Kapila
we have a need to do that during testing - which we do in the night when load is less what we do is call a web page which changes the log4j properties at run time - loads from the 'debug' or regular xml file Might be nice to have this as a feature but just saying you can do this now too with your

date wise log every X MB

2010-09-09 Thread Tushar Kapila
your time :) Regards Tushar Kapila - To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org