2 #################################################################################
4 # File: $RCSfile: MAPSLog.pm,v $
5 # Revision: $Revision: 1.1 $
6 # Description: MAPS routines for logging.
7 # Author: Andrew@DeFaria.com
8 # Created: Fri Nov 29 14:17:21 2002
9 # Modified: $Date: 2013/06/12 14:05:47 $
12 # (c) Copyright 2000-2006, Andrew@DeFaria.com, all rights reserved.
14 ################################################################################
25 use vars qw(@ISA @EXPORT);
52 return FindEmail($sender);
56 my ($nbr_days, $date) = @_;
59 $date ||= Today2SQLDatetime();
63 while ($nbr_days > 0) {
64 my $ymd = substr $date, 0, 10;
65 my $sod = $ymd . ' 00:00:00';
66 my $eod = $ymd . ' 23:59:59';
71 my $condition = "type=\'$_\' and (timestamp > \'$sod\' and timestamp < \'$eod\')";
73 # Not sure why I need to qualify countlog
74 $stats{$_} = MAPS::countlog($condition);
77 $dates{$ymd} = \%stats;
79 $date = SubtractDays $date, 1;
87 my ($type, $sender, $msg) = @_;
89 # Todo: Why do I need to specify MAPS:: here?
90 MAPS::AddLog($type, $sender, $msg);
98 Logmsg('debug', '', $msg);
106 Logmsg('error', '', $msg);
114 Logmsg('info', '', $msg);