The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Labyrinth::Audit - Audit Handler for Labyrinth.

SYNOPSIS

  use Labyrinth::Audit;

  SetLogFile(%hash);
  LogRecord($level,@args);

  # examples
  SetLogFile(
    FILE   => $logfile,
    USER   => $username,
    LEVEL  => $LOG_LEVEL_INFO,
    CLEAR  => 1,
    CALLER => 1
  );

  LogRecord($LOG_LEVEL_INFO,'Process Started');

DESCRIPTION

The Audit package contains a number of variables and functions that can be used within the framework to provide error, debugging and trace information.

EXPORT

  DumpToFile

  SetLogFile
  LogRecord

  LogError
  LogWarning
  LogInfo
  LogDebug

  $LOG_LEVEL_ERROR
  $LOG_LEVEL_WARN
  $LOG_LEVEL_INFO
  $LOG_LEVEL_DEBUG

  $LOG_LEVEL

FUNCTIONS

Audit Log Handling

Audit Log functions enable tracing of actions for a user at a given time.

DumpToFile($file,@blocks)

Writes blocks (separated by new lines) to the given file. Creates the file if it doesn't exist, and overwrites if it does.

SetLogFile(%hash)

Hash table entries can be as follows:

    FILE  => $logfile,
    USER  => $username,
    LEVEL => $LOG_LEVEL_INFO,
    CLEAR => 1;

Note that FILE and USER are mandatory.

Sets the path of the file to be used as the log, together with the current username accessing the application.

Note that if there is any failure, such as no file access, the audit trail is disabled.

LogRecord($level,@args)

Record informational messages to Audit Log.

LogError(@args)

Shorthand call for Error messages.

LogWarning(@args)

Shorthand call for Warning messages.

LogInfo(@args)

Shorthand call for Information messages.

LogDebug(@args)

Shorthand call for Debug messages.

SEE ALSO

  Log::LogLite
  Labyrinth

AUTHOR

Barbie, <barbie@missbarbell.co.uk> for Miss Barbell Productions, http://www.missbarbell.co.uk/

COPYRIGHT & LICENSE

  Copyright (C) 2002-2015 Barbie for Miss Barbell Productions
  All Rights Reserved.

  This module is free software; you can redistribute it and/or
  modify it under the Artistic License 2.0.