-
- 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;
+
+ writelog($log,$msg);