summaryrefslogtreecommitdiffstats
path: root/inc/eventlog.inc.php
blob: dadccdd76e5e51d146fc3f073c29016fcd8517a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

class EventLog
{
		
	private static function log($type, $message)
	{
		Database::exec("INSERT INTO eventlog (dateline, logtypeid, description)"
			. " VALUES (UNIX_TIMESTAMP(), :type, :message)", array(
				'type' => $type,
				'message' => $message
		));
	}
	
	public static function failure($message)
	{
		self::log('failure', $message);
	}
	
	public static function warning($message)
	{
		self::log('warning', $message);
	}
	
	public static function info($message)
	{
		self::log('info', $message);
	}
	
}