Cron logs are now clearer

This commit is contained in:
Juan 2018-10-08 14:21:37 +02:00
parent f57ca0c010
commit c1787fc0a0
2 changed files with 4 additions and 4 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
vn-vmware (1.0.30) stable; urgency=low
vn-vmware (1.0.31) stable; urgency=low
* Initial Release.

View File

@ -182,6 +182,7 @@ sub log_to_file {
my $time_mark = $time->strftime('%Y-%m-%d %H:%M:%S');
print $log_fh "$time_mark $message";
}
sub log_message {
my ($message) = @_;
@ -191,6 +192,7 @@ sub log_message {
log_to_file "LOG: $message\n";
}
}
sub log_error {
my ($error) = @_;
@ -202,9 +204,7 @@ sub log_error {
$error .= "\n";
}
print color('red');
print $error;
print color('reset');
print STDERR $error;
if ($log_fh) {
log_to_file "ERR: $error";