<<

NAME

Log.pm -- a simple log file abstraction.

SYNOPSIS

  use Log;
  my $log = Log::create_log($log_file);

  $log->log_time("Log start message with timestamp");
  $log->log_msg("Log error or warning");
  $log->log_file("Log message and additional file", $file_name);
  $log->log_time("Log end message with timestamp");

  $log->close();

DESCRIPTION

This module provides a simple logging abstraction.

Create an instance of Log

  Log::create_log(file_name [, mode])

Open log file with open mode append (default) and return reference to log object.

General subroutines:

  $log->log_msg(message)

Log provided message.

  $log->log_time(message)

Log provided message with the current timestamp and the name of calling script.

  $log->log_file(message, file_name)

Log provided message and append content of file.

  $log->close()

Close log file.

<<