[logback-user] About FileAppender in Logback

haobo liu lhbazazazv at gmail.com
Fri Nov 1 08:09:28 CET 2019


I think  triggeringPolicy  need with   RollingFileAppender. combine your
needs it may be necessary to implement a special implementation of
ch.qos.logback.core.rolling.TriggeringPolicyBase ;)

If there is a good way, please share,nice day

<Hasan.Birol at ing.com.tr> 于2019年11月1日周五 下午2:04写道:

> 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 also used, triggeringPolicy cant succeed..
>
>
>
> <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,
>
>
> *Hasan Birol*
> Yazılım Danışmanı - Software Consultant
> Yazılım Geliştirme Sistemleri ve Platform Uygulamaları Bölümü - Software
> Development Frameworks and Platform Applications
> *T: *
> *E: *Hasan.Birol at ing.com.tr
> <https://www.ing.com.tr>
> ------------------------------
> * <https://www.ing.com.tr/> *
>
> 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.
>
>
> _______________________________________________
> logback-user mailing list
> logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20191101/58d320bf/attachment.html>


More information about the logback-user mailing list