change log updated
[public/netxms.git] / include / nxlog.h
CommitLineData
7259dd2c
VK
1/*
2** NetXMS - Network Management System
68f384ea 3** Copyright (C) 2003-2010 Victor Kirhenshtein
7259dd2c
VK
4**
5** This program is free software; you can redistribute it and/or modify
68f384ea
VK
6** it under the terms of the GNU Lesser General Public License as published
7** by the Free Software Foundation; either version 3 of the License, or
7259dd2c
VK
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
68f384ea 15** You should have received a copy of the GNU Lesser General Public License
7259dd2c
VK
16** along with this program; if not, write to the Free Software
17** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18**
fb151c0b 19** File: nxlog.h
7259dd2c
VK
20**
21**/
22
23#ifndef _nxlog_h_
24#define _nxlog_h_
25
1499848d
VK
26/**
27 * Constants
28 */
b522b89b 29#define MAX_OBJECT_NAME 64
7259dd2c
VK
30#define MAX_LOG_MSG_LENGTH 1024
31#define MAX_SYSLOG_HOSTNAME_LEN 128
32#define MAX_SYSLOG_TAG_LEN 33
33
1499848d
VK
34/**
35 * Syslog severity codes
36 */
7259dd2c
VK
37#define SYSLOG_SEVERITY_EMERGENCY 0
38#define SYSLOG_SEVERITY_ALERT 1
39#define SYSLOG_SEVERITY_CRITICAL 2
40#define SYSLOG_SEVERITY_ERROR 3
41#define SYSLOG_SEVERITY_WARNING 4
42#define SYSLOG_SEVERITY_NOTICE 5
43#define SYSLOG_SEVERITY_INFORMATIONAL 6
44#define SYSLOG_SEVERITY_DEBUG 7
45
1499848d
VK
46/**
47 * Policy flags
48 */
30014381
VK
49#define NX_LPPF_WINDOWS_EVENT_LOG 0x0001
50#define NX_LPPF_REPORT_UNMATCHED 0x0002
51
1499848d
VK
52/**
53 * Syslog message structure
54 */
7259dd2c
VK
55typedef struct
56{
1499848d 57 UINT64 qwMsgId; // NetXMS internal message ID
1094818a 58 time_t tmTimeStamp;
1499848d
VK
59 INT32 nFacility;
60 INT32 nSeverity;
967893bb 61 UINT32 dwSourceObject;
e0f99bf0
VK
62 char szHostName[MAX_SYSLOG_HOSTNAME_LEN];
63 char szTag[MAX_SYSLOG_TAG_LEN];
64 char szMessage[MAX_LOG_MSG_LENGTH];
65} NX_SYSLOG_RECORD;
7259dd2c 66
9fa031cd 67
7259dd2c 68#endif