Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: log4j RollingFileAppender Date: Sun, 14 Aug 2016 21:01:57 -0400 Organization: Aioe.org NNTP Server Lines: 20 Message-ID: References: <87shuakxjq.fsf@Equus.decebal.nl> <87k2fllkjf.fsf@Equus.decebal.nl> NNTP-Posting-Host: 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:35347 On 8/14/2016 4:24 PM, Marcel Mueller wrote: > On 13.08.16 16.04, Arne Vajhøj wrote: >>> In contrast to log4j >>> files will never get renamed because this could confuse concurrently >>> reading applications or even cause locks (depending on the OS and file >>> system). Instead we use (partial) time-stamps in the log name, e.g. the >>> date in yyyymmdd format. >> >> I believe that is what log4j RollingFileAppender does as well. > > AFAIK it uses rename, similar to syslog. See documentation of rollOver. > This is unusable for concurrent (unsynchronized) read access. org.apache.log4j.RollingFileAppender rename. But org.apache.log4j.rolling.RollingFileAppender should not rename. Arne