File: syslog_example1.adb

package info (click to toggle)
libalog 0.6.2-7.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 784 kB
  • sloc: ada: 4,353; makefile: 99; sh: 18; ansic: 5
file content (17 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
with Alog.Logger;
with Alog.Facilities.Syslog;

use Alog;

--  Alog syslog example.
procedure Syslog_Example1 is
   Log    : Logger.Instance (Init => False);
   Syslog : constant Facilities.Syslog.Handle :=
     new Facilities.Syslog.Instance;
begin
   Log.Attach_Facility (Facility => Facilities.Handle (Syslog));

   Syslog.Set_Origin (Value => Facilities.Syslog.LOG_DAEMON);
   Log.Log_Message (Level  => Debug,
                    Msg    => "This is a testmessage");
end Syslog_Example1;