I am using logging vai Log :: Log4perl in my perl script; I am wondering if making multiple calls to write to the same log object will cause incorrect / erroneous behavior.
I use Appender :: File to write the log as follows:
$log->info("Launching commands..."); foreach my $param (@params) { push @thread_handles, async { system("$param"); $log->info("$param COMPLETE"); logstatus($?); }; } $_->join() foreach @thread_handles; $log->info("Commands completed...");
Log :: Log4perl with the file file will work by default , but some overlaps can occur in multi-threaded or multi-processor using the same log file.
Log:: Log4perl:: Appender:: Synchronized . . Log:: Log4perl mod_perl? FAQ .
Synchronized appender . : ? perlthrtut, . . - ?
threads::shared , threads::shared documentation , , . perl 5.8.8, , , .
threads::shared
, . log4perl , . , .
: , . log4perl, script, - , , . . , , , . .
Log4perl , .
, , .
, pid logmessage.
, .
I select one log file with pid or some kind of stream id. I use this kind of logging without problems.
Yours faithfully,
Source: https://habr.com/ru/post/1537930/More articles:The image of the UISlider track disappears when you return from a specific view - iosкакая разница в Java-объектах, созданных с помощью "новых" и тех, которые не используют "новые", - javaR блестящая связь RODBC - rAttempting to Override IO :: Tee :: PRINT for Thread Safety - multithreadingHow to concatenate two string arrays in Java - javaUpload CSV to database using php - phpMex profile function in visual studio - visual-studio-2010Запрос свойства, находящегося в глубоко вложенном массиве - node.jsПроигрыватель FireFox Button и li не являются кликабельными или парящими - javascriptPotential alternative to File :: Tee? - multithreadingAll Articles