Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: [SPAM] RE: Antwort: RE: Failed to rename log file: msg#00052

apache.logging.log4cxx.user

Subject: Re: [SPAM] RE: Antwort: RE: Failed to rename log file

Another option:

1. Setup a SocketAppender in the process to send logs to a "log server"
process
2. Create a "logserver" that then logs the data to file -- so you get a
single file.

Renny Koshy
President & CEO

--------------------------------------------
RUBIX Information Technologies, Inc.
www.rubixinfotech.com



"Combes, Chris
M."
<chris.combes@ngc To
.com> "Log4CXX User"
<log4cxx-user@xxxxxxxxxxxxxxxxxx>
11/30/2005 09:37 cc
AM
Subject
[SPAM] RE: Antwort: RE: Failed to
Please respond to rename log file
"Log4CXX User"
<log4cxx-user@log
ging.apache.org>







Can you get a process ID for each process? If so, then you could use the
unique process ID as part of the file name. Just a thought.
-Chris

-----Original Message-----
From: Jitendra Kharche [mailto:Jitendra.Kharche@xxxxxxxxxxxxxxxxxxxxx]
Sent: Wednesday, November 30, 2005 9:36 AM
To: Log4CXX User
Subject: RE: Antwort: RE: Failed to rename log file


Hi Jürgen,

Thanks a lot.

I cannot use the second option. I have a java application that maintains a
pool of these processes. As per the pool, the processes are launched and
destroyed to maintain sufficient number of processes in the pool to serve
the application. Moreoverall processes are instances of the same
executable. Hence they write to the same log file.

Regarding the first option, can any other Appender be used to avoid this
problem? I am not keen about RollingFileAppender as far as the log is
generated correctly and the older files are backed up.

Regards,
Jitendra


-----Original Message-----
From: Habelt, Juergen [mailto:habelt@xxxxxxxxxxxxx]
Sent: Wednesday, November 30, 2005 7:23 PM
To: Log4CXX User
Subject: Antwort: RE: Failed to rename log file





Jitendra,

as I can see, there are only 2 options:
- do not use (Daily)RollingFileAppender
- or use different log file names for different processes.

We decided to choose the second option and now it works well.

Regards
Jürgen Habelt
Software - Developer
Carl Zeiss SMS GmbH
Phone : +49 (0)3641 642945
EMail : habelt@xxxxxxxxxxxxx




"Jitendra
Kharche"
<Jitendra.Kharche An
@geometricsoftwar "Log4CXX User"
e.com> <log4cxx-user@xxxxxxxxxxxxxxxxxx>
Gesendet von: Kopie
log4cxx-user-retu
rn-1319-habelt=sm Thema
t.zeiss.com@loggi RE: Failed to rename log file
ng.apache.org


30.11.2005 14:01


Bitte antworten
an
"Log4CXX User"
<log4cxx-user@log
ging.apache.org>







Thanks Jürgen.
Exactly, I have the same problem. I am accessing the log file from multiple
processes.
But how to overcome this?

Regards,
Jitendra


-----Original Message-----
From: Habelt, Juergen [mailto:habelt@xxxxxxxxxxxxx]
Sent: Wednesday, November 30, 2005 1:18 PM
To: Log4CXX User
Subject: Antwort: Failed to rename log file





Hello,

I had the same problem with the "RollinggFileAppender" in log4cxx 0.9.7 The
reason was, the log file was opened in a second process. this prevented the
first process to rename the file and the file was truncated to zero length
in its trial to create a new empty log file (after the rename)

Regards
Jürgen Habelt
Software - Developer
Carl Zeiss SMS GmbH
Phone : +49 (0)3641 642945
EMail : habelt@xxxxxxxxxxxxx




"Jitendra
Kharche"
<Jitendra.Kharche An
@geometricsoftwar "Log4CXX User"
e.com> <log4cxx-user@xxxxxxxxxxxxxxxxxx>
Gesendet von: Kopie
log4cxx-user-retu
rn-1316-habelt=sm Thema
t.zeiss.com@loggi Failed to rename log file
ng.apache.org


29.11.2005 09:05


Bitte antworten
an
"Log4CXX User"
<log4cxx-user@log
ging.apache.org>







Hi,

I am using Log4Cxx on Windows. I always get the following error

------------------------------------------------------------------------
-----------------------------------
Failed to rename [C:\app-name/logs/event-handler.log] to
[C:\app-name/logs/event-handler.log.2005-11-28].
------------------------------------------------------------------------
-----------------------------------

Due to this error, in order to continue writing log, Log4Cxx overwrites the
old log file. Thus I lose the old log.

I am using DailyRollingFileAppender and my config file is as given below

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "./log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";
debug="false">
<appender name="APP_LOGFILE"
class="org.apache.log4j.DailyRollingFileAppender">
<errorHandler
class="org.apache.log4j.helpers.OnlyOnceErrorHandler"/>
<param name="File"
value="${APP_HOME}/logs/event-handler.log"/>
<param name="Append" value="true"/>
<param name="Threshold" value="warn"/>

<!-- Rollover at midnight each day -->
<!--<param name="DatePattern" value="yyyy-MM-dd"/>
Does not work-->

<param name="MaxFileSize" value="25MB" />
<param name="MaxBackupIndex" value="10" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d %-5p
[%c{1}] %m%n"/>
</layout>
</appender>

<root>
<appender-ref ref="APP_LOGFILE"/>
</root>
</log4j:configuration>

Regards,
Jitendra









<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation