in reply to Logging module sometimes writes its file in the wrong directory
I don't even know where to start looking for this bug,It's opening in the "wrong" place, so let's start with the open call:
So it uses $dir .. now to see where that's set, which is in BEGIN .. and has this snippet:open(LOG, ">>$dir/$log_file") or croak "Unable to append to error log: + $!";
Several important items here:$0 =~ '(.*[\\\/])\w+\.\w+$'; $dir = $1;
$dir = $1 if $0 =~ m#/.*[\\/])\w+\.\w+$#;
use File::Basename; $dir = dirname($0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Logging module sometimes writes its file in the wrong directory
by Anonymous Monk on May 03, 2006 at 16:55 UTC | |
by CountOrlok (Friar) on May 03, 2006 at 17:33 UTC |