NAME

Konstrukt::Plugin::log::DBI - Konstrukt logging. DBI backend

SYNOPSIS

        #nothing special here

DESCRIPTION

Konstrukt logging. DBI backend

CONFIGURATION

        #backend
        log/DBI/source       dbi:driver:db:server
        log/DBI/user         user
        log/DBI/pass         pass

If no database settings are set the defaults from "CONFIGURATION" in Konstrukt::DBI will be used.

Note that you have to create a table called log. You may turn on the install setting (see "CONFIGURATION" in Konstrukt::Handler) or use the KonstruktBackendInitialization.pl script to accomplish this task.

METHODS

init

Initialization of this class

install

Installs the backend (e.g. create tables).

Parameters:

none

put

Adds a new log entry.

Parameters:

  • $type - The type/source of this entry

  • $description - A human readable description

  • $host - The host name/address

  • ($key1 .. $key5) - Optional additional keys

get

Returns the requested log entries as an array reference of hash references.

Parameters:

  • $type - The type/source of this entry

  • $orderby - The list will be ordered by this expression, which will be passed as-is to the SQL-query.

  • $limit - Max. number of returned entries

AUTHOR

Copyright 2006 Thomas Wittek (mail at gedankenkonstrukt dot de). All rights reserved.

This document is free software. It is distributed under the same terms as Perl itself.

SEE ALSO

Konstrukt::Plugin::log, Konstrukt