Rombobjörn

summaryrefslogtreecommitdiff
path: root/test/test_system_log.adb
blob: 5a0a053c86beaa950594106f3ddc7309e753001b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- This is a simple test program for testing System_Log.
-- Copyright 2009 - 2017 B. Persson, Bjorn@Rombobeorn.se
--
-- This program is free software: you can redistribute it and/or modify it
-- under the terms of the GNU General Public License version 3, as published
-- by the Free Software Foundation.


with System_Log; use System_Log;

procedure Test_System_Log is
begin
   Open_Log("Test_System_Log", User, Standard_Error_Too => True,
            Include_PID => True);
   Log(Info, "This is a test message on the info level.");
   Log(Debug, "This is a test message on the debug level.");
   Set_Log_Threshold(Info);
   Log(Debug, "This test message is below the threshold and shouldn't be seen.");
   Log(Info, "This test message is above the threshold and should be seen.");
   Log(Local5, Info, "This is a test message logged as the Local5 facility.");
end Test_System_Log;