-
- if (open $log,'>>',$log) {
- flock $log,LOCK_EX;
- seek $log,0,SEEK_END;
- printf {$log} "%s [%s_%s] (%s) %s\n",
- isodate(time),$$,$ENV{REQUESTCOUNT},$fra,$msg;
- close $log;
+ $msg = sprintf "%s [%s_%s] (%s) %s\n",
+ isodate(time),$$,$ENV{REQUESTCOUNT},$fra,$msg;
+
+ foreach my $log (@logdir) {
+ if (open $log,'>>',"$log/rup.log") {
+ flock $log,LOCK_EX;
+ seek $log,0,SEEK_END;
+ printf {$log} $msg;
+ close $log;
+ }