Compare commits

...

2 Commits

Author SHA1 Message Date
64b28349c9 correction 2023-09-23 20:12:27 +00:00
c15a4b6030 change date format to YYYY-MM-DD 2023-09-23 20:09:42 +00:00

View File

@ -158,7 +158,7 @@ sub prepareLogFile {
my $aChannelName = $_[2];
if(exists($aLogFiles->{$aChannelName})) {
my $filename = localtime->dmy("-").".txt";
my $filename = localtime->ymd("-").".txt";
if($filename ne $aLogFiles->{$aChannelName}{"filename"}) {
close($aLogFiles->{$aChannelName}{"file"});
my $outputFileFolder = $configuration::logFolder."/".$aServerName."/".$aChannelName;
@ -180,12 +180,12 @@ sub prepareLogFile {
if(!(-e $outputFileFolder)) {
File::Path::make_path($outputFileFolder);
}
my $outputFilePath = $outputFileFolder."/".localtime->dmy("-").".txt";
my $outputFilePath = $outputFileFolder."/".localtime->ymd("-").".txt";
open(my $file, ">>", $outputFilePath);
if($file) {
printf("[info] Outputting channel '%s' at '%s' to '%s'\n", $aChannelName, $aServerName, $outputFilePath);
$aLogFiles->{$aChannelName}{"file"} = $file;
$aLogFiles->{$aChannelName}{"filename"} = localtime->dmy("-").".txt";
$aLogFiles->{$aChannelName}{"filename"} = localtime->ymd("-").".txt";
$aLogFiles->{$aChannelName}{"names"} = [];
}
else {