correction
This commit is contained in:
parent
c15a4b6030
commit
64b28349c9
@ -158,7 +158,7 @@ sub prepareLogFile {
|
|||||||
my $aChannelName = $_[2];
|
my $aChannelName = $_[2];
|
||||||
|
|
||||||
if(exists($aLogFiles->{$aChannelName})) {
|
if(exists($aLogFiles->{$aChannelName})) {
|
||||||
my $filename = localtime->ydm("-").".txt";
|
my $filename = localtime->ymd("-").".txt";
|
||||||
if($filename ne $aLogFiles->{$aChannelName}{"filename"}) {
|
if($filename ne $aLogFiles->{$aChannelName}{"filename"}) {
|
||||||
close($aLogFiles->{$aChannelName}{"file"});
|
close($aLogFiles->{$aChannelName}{"file"});
|
||||||
my $outputFileFolder = $configuration::logFolder."/".$aServerName."/".$aChannelName;
|
my $outputFileFolder = $configuration::logFolder."/".$aServerName."/".$aChannelName;
|
||||||
@ -180,12 +180,12 @@ sub prepareLogFile {
|
|||||||
if(!(-e $outputFileFolder)) {
|
if(!(-e $outputFileFolder)) {
|
||||||
File::Path::make_path($outputFileFolder);
|
File::Path::make_path($outputFileFolder);
|
||||||
}
|
}
|
||||||
my $outputFilePath = $outputFileFolder."/".localtime->ydm("-").".txt";
|
my $outputFilePath = $outputFileFolder."/".localtime->ymd("-").".txt";
|
||||||
open(my $file, ">>", $outputFilePath);
|
open(my $file, ">>", $outputFilePath);
|
||||||
if($file) {
|
if($file) {
|
||||||
printf("[info] Outputting channel '%s' at '%s' to '%s'\n", $aChannelName, $aServerName, $outputFilePath);
|
printf("[info] Outputting channel '%s' at '%s' to '%s'\n", $aChannelName, $aServerName, $outputFilePath);
|
||||||
$aLogFiles->{$aChannelName}{"file"} = $file;
|
$aLogFiles->{$aChannelName}{"file"} = $file;
|
||||||
$aLogFiles->{$aChannelName}{"filename"} = localtime->ydm("-").".txt";
|
$aLogFiles->{$aChannelName}{"filename"} = localtime->ymd("-").".txt";
|
||||||
$aLogFiles->{$aChannelName}{"names"} = [];
|
$aLogFiles->{$aChannelName}{"names"} = [];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user