#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
=cut
sub Init {
-
- my @arg = @_;
+ shift if @_%2; # code is inconsistent about calling as method
+ my %args = (@_);
CheckPerlRequirements();
#Get a database connection
ConnectToDatabase();
InitSystemObjects();
- InitClasses();
- InitLogging(@arg);
+ InitClasses(%args);
+ InitLogging(%args);
InitPlugins();
RT::I18N->Init;
RT->Config->PostLoadCheck;
my ($package, $filename, $line) = caller($frame);
$p{'message'} =~ s/(?:\r*\n)+$//;
- return "[". gmtime(time) ."] [". $p{'level'} ."]: "
+ return "[$$] [". gmtime(time) ."] [". $p{'level'} ."]: "
. $p{'message'} ." ($filename:$line)\n";
};
$p{message} =~ s/(?:\r*\n)+$//;
if ($p{level} eq 'debug') {
- return "$p{message}\n";
+ return "[$$] $p{message} ($filename:$line)\n";
} else {
- return "$p{message} ($filename:$line)\n";
+ return "[$$] $p{message}\n";
}
};