Are you asking if 2 apps can log to two different log files? The answer to that is yes but I'm not sure I've answered your question. Can you rephrase it?
Are you asking if it could be possible for 2 apps to log to the same file? ________________________________ From: Haider <[email protected]> To: [email protected] Sent: Tuesday, 13 January, 2009 16:37:24 Subject: Re: logging start on last log file intended of current log file i am no using same file for both app. can't it possible manage 2 app logging on different log files while both app having different context. log4j.rootLogger=DEBUG, rolling log4j.logger.org.apache.commons=ERROR # Configure the stdout appender to go to the Console log4j.appender.stdout=org.apache.log4j.ConsoleAppender # Configure the stdout appender to use the PatternLayout log4j.appender.stdout.layout=org.apache.log4j.PatternLayout # Pattern to output the caller's file name and line number. log4j.appender.stdout.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss a} %l %n%-5p: %m%n # Configure the rolling appender to be a RollingFileAppender log4j.appender.rolling=org.apache.log4j.DailyRollingFileAppender # Roll the log file at a certain time log4j.appender.rolling.DatePattern='-'yyyy-MMM-dd # Configure the name of the logout for the rolling appender log4j.appender.rolling.File=TicketMonitoring.log # Configure the Layout pattern and conversion pattern for the rolling appender log4j.appender.rolling.layout=org.apache.log4j.PatternLayout # changed by MFB #log4j.appender.rolling.layout.ConversionPattern=%d{MMM dd, yyyy HH:mm:ss a} %l %n%-5p: %m%n log4j.appender.rolling.layout.ConversionPattern=[%-5p]-(%c:%L)-%m%n Guilherme Costa wrote: > > And how would you know witch line is from witch app??? > I am working on a SocketServer and all remote apps with SocketAppender, > but > i need to know on the big file on the server, where the messages are > coming > from! > > Any ideas? > > > Thanks, > Gui > > On Tue, Jan 13, 2009 at 1:41 PM, <[email protected]> wrote: > >> Basic answer... don't have two apps logging to the same file. The best >> way >> that's usually promoted is to use the SocketAppender ( >> http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/net/SocketAppender.html). >> So both apps log to a server which is a simple single app that logs to >> the >> file. >> >> Have a read through http://timarcher.com/?q=node/10. It should give you >> enough information to set it up. >> >> >> >> >> ________________________________ >> From: Haider <[email protected]> >> To: [email protected] >> Sent: Tuesday, 13 January, 2009 15:27:19 >> Subject: Re: logging start on last log file intended of current log file >> >> >> yes this is right, i am using unix with 2 apps, this problem is started >> when >> i used DWR in my App, so what do u suggest. How to handle it. >> >> >> dhallammail-log4j wrote: >> > >> > Is there another application logging to the same file? >> > >> > If you're running on a *nix o/s, the file handles are the file number >> and >> > not the file name. So if another app has rolled the file, your app is >> > likely to still be pointing at the orignal file which has now been >> > renamed. >> > >> > >> > >> > >> > ________________________________ >> > From: Haider <[email protected]> >> > To: [email protected] >> > Sent: Tuesday, 13 January, 2009 11:19:53 >> > Subject: logging start on last log file intended of current log file >> > >> > >> > i am using log4j is it working file, with following configuration >> > log4j.appender.dest4=org.apache.log4j.DailyRollingFileAppender >> > log4j.additivity.dest4=false >> > log4j.appender.dest4.File=debuglog.txt >> > log4j.appender.dest4.DatePattern='.'yyyy-MM-dd >> > log4j.appender.dest1.ImmediateFlush=true >> > log4j.appender.dest4.layout=org.apache.log4j.PatternLayout >> > log4j.appender.dest4.layout.ConversionPattern=[%-5p]-(%c:%L)-%m%n >> > >> > Logging is working fine, all log write into debuglog.txt file, after 2 >> to >> > 3 >> > hours its started logging into last day of log file Intended of >> > current >> > log file. >> > >> > -- >> > View this message in context: >> > >> http://www.nabble.com/logging-start-on-last-log-file-intended-of-current-log-file-tp21433602p21433602.html >> > Sent from the Log4j - Users mailing list archive at Nabble.com. >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [email protected] >> > For additional commands, e-mail: [email protected] >> > >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/logging-start-on-last-log-file-intended-of-current-log-file-tp21433602p21437931.html >> Sent from the Log4j - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >> >> > > -- View this message in context: http://www.nabble.com/logging-start-on-last-log-file-intended-of-current-log-file-tp21433602p21439417.html Sent from the Log4j - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
