File: alog-facilities-syslog.ads

## Documentation

Table of Contents
Class Inheritance Tree

1.     --

2.     --  Copyright (c) 2008-2011,

3.     --  Reto Buerki, Adrian-Ken Rueegsegger

4.     --

5.     --  This file is part of Alog.

6.     --

7.     --  Alog is free software; you can redistribute it and/or modify

8.     --  it under the terms of the GNU Lesser General Public License as published

9.     --  by the Free Software Foundation; either version 2.1 of the License, or

10.     --  (at your option) any later version.

11.     --

12.     --  Alog is distributed in the hope that it will be useful,

13.     --  but WITHOUT ANY WARRANTY; without even the implied warranty of

14.     --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the

15.     --  GNU Lesser General Public License for more details.

16.     --

17.     --  You should have received a copy of the GNU Lesser General Public License

18.     --  along with Alog; if not, write to the Free Software

19.     --  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,

20.     --  MA  02110-1301  USA

22.     --  Syslog facility: Used to log to systems syslog.

23.     package Alog.Facilities.SyslogTo API docTo specTo body is

25.        type InstanceTo API docTo body is new Alog.Facilities.InstanceTo API docTo specTo body with private;

26.        --  Syslog based logging facility.

28.        type Handle is access all InstanceTo API docTo specTo body;

30.        type Syslog_Origin is

31.          (LOG_AUTH,

32.           LOG_AUTHPRIV,

33.           LOG_CRON,

34.           LOG_DAEMON,

35.           LOG_FTP,

36.           LOG_KERN,

37.           LOG_LOCAL0,

38.           LOG_LOCAL1,

39.           LOG_LOCAL2,

40.           LOG_LOCAL3,

41.           LOG_LOCAL4,

42.           LOG_LOCAL5,

43.           LOG_LOCAL6,

44.           LOG_LOCAL7,

45.           LOG_LPR,

46.           LOG_MAIL,

47.           LOG_NEWS,

48.           LOG_SYSLOG,

49.           LOG_USER,

50.           LOG_UUCP);

51.        --  Syslog facilties. Specifies what type of program is logging the message.

53.        procedure Set_OriginTo API docTo body

54.          (FacilityTo API docTo body : in out InstanceTo API docTo specTo body;

55.           ValueTo API docTo body    :        Syslog_OriginTo API docTo spec);

56.        --  Set origin of syslog message.

58.        function Get_OriginTo API docTo body (FacilityTo API docTo body : InstanceTo API docTo specTo body) return Syslog_OriginTo API docTo spec;

59.        --  Return currently set syslog origin of given facility.

61.     private

63.        overriding

64.        procedure Write

65.          (Facility : InstanceTo API docTo specTo body;

66.           Level    : Log_LevelTo API docTo spec := Info;

67.           Msg      : String);

68.        --  Implementation of the Write procedure for syslog.

70.        type InstanceTo API docTo spec is new Alog.Facilities.InstanceTo API docTo specTo body with record

71.           Origin : Syslog_OriginTo API docTo spec := LOG_USER;

72.        end record;

74.     end Alog.Facilities.SyslogTo API docTo specTo body;