[logback-user] About FileAppender in Logback

Hasan.Birol at ing.com.tr Hasan.Birol at ing.com.tr
Fri Oct 18 13:15:44 CEST 2019


Added to mailing list.

From: Hasan Birol [Yazilim Gelistirme Sistemleri ve Platform Uygulamalari Bolumu]
Sent: Friday, October 18, 2019 2:00 PM
To: 'logback-user at qos.ch' <logback-user at qos.ch>
Cc: Bilgehan Yildiz [Yazilim Gelistirme Sistemleri ve Platform Uygulamalari Bolumu] <Bilgehan.Yildiz at ing.com.tr>; Rafet Cambaz [Yazilim Gelistirme Sistemleri ve Platform Uygulamalari Bolumu] <Rafet.Cambaz at ing.com.tr>
Subject: About FileAppender in Logback

Dear Logback Team;


Have a problem with logback .
Have a logback.xml file find it below. Each thread has a single log file. However, cant recognize file is done or thread is done with looking the file. File is not locked or something (tried to lock the file by extending fileappender but cant succeed) . I don't would like to write a code to get content of file which I mean, dont wanna write a some symbol to find out file is done. I have been searching it for 3 months :) I hope you help me. Many thanks.

<appender name="SIFT" class="XXXXX.SiftingAppender">
    <discriminator>
        <key>fileLocation</key>
        <defaultValue>${user.home}\start.log</defaultValue>
    </discriminator>
    <sift>
        <appender name="FILE-${fileLocation}" class="ch.qos.logback.core.FileAppender">
            <file>${fileLocation}</file>
            <append>false</append>
            <encoder>
                <pattern>%msg%n</pattern>
            </encoder>
        </appender>
    </sift>
</appender>

I just would like to change extension when thread is done .log to .xml, or lock the file while end of the thread, or move the file end of the thread.


Many many thanks.

Have a nice day,


Q on StackOverFlow : https://stackoverflow.com/questions/58434943/why-fileappender-is-not-locking-the-file


Hasan


Kisiye ozel bu mesaj ve icerigindeki bilgiler gizlidir. ING bu mesajin icerigi ve ekleri ile ilgili olarak 
hukuksal hicbir sorumluluk kabul etmez.Yetkili alicilardan biri degilseniz, bu mesajin herhangi bir sekilde 
ifsa 
edilmesi, kullanilmasi, kopyalanmasi,yayilmasi veya mesajda yeralan hususlarla ilgili olarak herhangi bir 
islem 
yapilmasinin kesinlikle yasak oldugunu bildiririz.Boyle bir durumda lutfen hemen mesajin gondericisini 
bilgilendiriniz ve mesaji sisteminizden siliniz.Internet ortaminda gonderilen e-posta mesajlarindaki hata 
ve/veya 
eksikliklerden veya viruslerden dolayi mesajin gondericisi herhangi bir sorumluluk kabul 
etmemektedir.Tesekkur ederiz.

The information contained in this communication may contain confidential or legally privileged information. 
ING doesn't accept any legal responsibility for the contents and attachments of this message. If you 
are not the intended recipient you are hereby notified that any disclosure, use, copying, distribution or taking 
any action in reliance on the contents of this information is strictly prohibited. If you have received this 
communication in error, please notify the sender immediately by responding to this e-mail and then delete it 
from your system. The sender does not accept any liability for any errors or omissions or any viruses in the 
context of this message which arise as a result of internet transmission. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20191018/e4ed54f0/attachment.html>


More information about the logback-user mailing list