aboutsummaryrefslogtreecommitdiff
path: root/src/test/log.cpp
blob: 0420e378168593e2f9b3394d30f2b808fcb0d215 (plain)
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
31
32
33
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include "multilog.h"
#include "multilogtext.h"

void testlog( const char *text );

class Test
{
public:
	Test()
	{
		MultiLineLog( 4, "Test init'd\n");
	}
};

int main()
{
	MultiLog &xLog = MultiLog::getInstance();

	xLog.LineLog( 2, "Hello again");

	MultiLog::getInstance().addChannel(
		new MultiLogText( STDOUT_FILENO, "%02y-%02m-%02d %02h:%02M:%02s: %t" )
		);

	MultiLineLog( MultiLog::LError, "Hi there!");
	Test t;

	testlog("external test");
}