Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
align constants with spaces
  • Loading branch information
sni committed Sep 30, 2024
1 parent 7aeb9b4 commit 1546298
Showing 1 changed file with 28 additions and 29 deletions.
57 changes: 28 additions & 29 deletions src/naemon/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,42 @@

/******************* LOGGING TYPES ********************/

#define NSLOG_RUNTIME_ERROR 1
#define NSLOG_RUNTIME_WARNING 2
#define NSLOG_RUNTIME_ERROR 1
#define NSLOG_RUNTIME_WARNING 2

#define NSLOG_VERIFICATION_ERROR 4
#define NSLOG_VERIFICATION_WARNING 8
#define NSLOG_VERIFICATION_ERROR 4
#define NSLOG_VERIFICATION_WARNING 8

#define NSLOG_CONFIG_ERROR 16
#define NSLOG_CONFIG_WARNING 32
#define NSLOG_CONFIG_ERROR 16
#define NSLOG_CONFIG_WARNING 32

#define NSLOG_PROCESS_INFO 64
#define NSLOG_EVENT_HANDLER 128
/*#define NSLOG_NOTIFICATION 256*/ /* NOT USED ANYMORE - CAN BE REUSED */
#define NSLOG_EXTERNAL_COMMAND 512
#define NSLOG_PROCESS_INFO 64
#define NSLOG_EVENT_HANDLER 128
/*#define NSLOG_NOTIFICATION 256*/ /* NOT USED ANYMORE - CAN BE REUSED */
#define NSLOG_EXTERNAL_COMMAND 512

#define NSLOG_HOST_UP 1024
#define NSLOG_HOST_DOWN 2048
#define NSLOG_HOST_UNREACHABLE 4096
#define NSLOG_HOST_UP 1024
#define NSLOG_HOST_DOWN 2048
#define NSLOG_HOST_UNREACHABLE 4096

#define NSLOG_SERVICE_OK 8192
#define NSLOG_SERVICE_UNKNOWN 16384
#define NSLOG_SERVICE_WARNING 32768
#define NSLOG_SERVICE_CRITICAL 65536
#define NSLOG_SERVICE_OK 8192
#define NSLOG_SERVICE_UNKNOWN 16384
#define NSLOG_SERVICE_WARNING 32768
#define NSLOG_SERVICE_CRITICAL 65536

#define NSLOG_PASSIVE_CHECK 131072
#define NSLOG_PASSIVE_CHECK 131072

#define NSLOG_INFO_MESSAGE 262144
#define NSLOG_INFO_MESSAGE 262144

#define NSLOG_HOST_NOTIFICATION 524288
#define NSLOG_SERVICE_NOTIFICATION 1048576
#define NSLOG_EXT_CUSTOM 2097152
#define NSLOG_HOST_NOTIFICATION 524288
#define NSLOG_SERVICE_NOTIFICATION 1048576
#define NSLOG_EXT_CUSTOM 2097152

/***************** DEBUGGING LEVELS *******************/

#define DEBUGL_ALL -1
#define DEBUGL_ALL -1
#define DEBUGL_NONE 0
#define DEBUGL_CONFIG 2
#define DEBUGL_CONFIG 2
#define DEBUGL_PROCESS 4
#define DEBUGL_STATUSDATA 4
#define DEBUGL_RETENTIONDATA 4
Expand All @@ -65,7 +65,7 @@
#define DEBUGL_SCHEDULING 8192

#define DEBUGV_BASIC 0
#define DEBUGV_MORE 1
#define DEBUGV_MORE 1
#define DEBUGV_MOST 2


Expand All @@ -86,8 +86,8 @@ __attribute__((__format__(__printf__, 2, 3)));
int log_debug_info(int, int, const char *, ...)
__attribute__((__format__(__printf__, 3, 4)));

int rotate_log_file(time_t); /* rotates the main log file */
int write_log_file_info(time_t *); /* records log file/version info */
int rotate_log_file(time_t); /* rotates the main log file */
int write_log_file_info(time_t *); /* records log file/version info */
int open_debug_log(void);
int close_debug_log(void);
int close_log_file(void);
Expand All @@ -96,8 +96,7 @@ int close_log_file(void);
* corresponding Naemon levels. Only intended for use as a regular handler,
* don't invoke directly through application code*/
extern guint nm_g_log_handler_id;
void nm_g_log_handler(const gchar *domain, GLogLevelFlags log_level,
const gchar *message, gpointer udata);
void nm_g_log_handler(const gchar *domain, GLogLevelFlags log_level, const gchar *message, gpointer udata);

NAGIOS_END_DECL
#endif

0 comments on commit 1546298

Please sign in to comment.