BuzzSaw

 view release on metacpan or  search on metacpan

lib/BuzzSaw/DB.pm  view on Meta::CPAN

processes can avoid reparsing a file that has not changed at some
later date.

=item check_log_seen( $logname, $digest )

This method will check if a log has already been processed based on
the contents of the SHA digest of its contents. It will return true
(one) if it has been previously seen or false (zero) otherwise.

=item register_event($event)

This takes a reference to a hash which contains values for all the
attributes which should be stored in the C<event> table for this log
entry.

The following attributes are required: C<raw>, C<digest>, C<logtime>,
C<hostname>, C<message>. The following attributes are optional:
C<program>, C<pid>, C<userid>. Further to this, a C<tags> entry can be
specified which will result in tags for this event being stored in the
C<tag> table. Values for any other hash keys will be ignored.

Note that the C<logtime> attribute must be a L<DateTime> object, that
will be automatically formatted correctly by L<DBIx::Class>.

=item check_event_seen($event)

This takes a reference to a hash which contains, at the very least, a
C<digest> key which refers to the SHA digest of the complete log
entry. It will return true (one) if it has been previously seen or
false (zero) otherwise.

=back

=head1 CONFIGURATION AND ENVIRONMENT

The BuzzSaw database schema is only known to work with PostgreSQL,
reports of success with other database types (or patches to add the
necessary support) would be very welcome.

=head1 DEPENDENCIES

This module is powered by L<Moose>. You will also need
L<MooseX::Types>, L<MooseX::Log::Log4perl> and
L<MooseX::SimpleConfig>.

This module provides an interface to the BuzzSaw L<DBIx::Class> schema
class. You will also need a DBI driver module such as L<DBD::Pg>.

=head1 SEE ALSO

L<BuzzSaw>, L<BuzzSaw::DB::Schema>

=head1 PLATFORMS

This is the list of platforms on which we have tested this
software. We expect this software to work on any Unix-like platform
which is supported by Perl.

ScientificLinux6

=head1 BUGS AND LIMITATIONS

Please report any bugs or problems (or praise!) to bugs@lcfg.org,
feedback and patches are also always very welcome.

=head1 AUTHOR

    Stephen Quinney <squinney@inf.ed.ac.uk>

=head1 LICENSE AND COPYRIGHT

    Copyright (C) 2012 University of Edinburgh. All rights reserved.

This library is free software; you can redistribute it and/or modify
it under the terms of the GPL, version 2 or later.

=cut



( run in 1.200 second using v1.01-cache-2.11-cpan-39bf76dae61 )