-
Notifications
You must be signed in to change notification settings - Fork 30
/
log.h
45 lines (35 loc) · 1 KB
/
log.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*-
* xnumon - monitor macOS for malicious activity
* https://www.roe.ch/xnumon
*
* Copyright (c) 2017-2019, Daniel Roethlisberger <daniel@roe.ch>.
* All rights reserved.
*
* Licensed under the Open Software License version 3.0.
*/
#ifndef LOG_H
#define LOG_H
#include "logevt.h"
#include "config.h"
#include "attrib.h"
#include <stdint.h>
#include <stdio.h>
int logfmt_parse(config_t *, const char *) NONNULL(1,2) WUNRES;
const char *logfmt_s(config_t *) NONNULL(1);
int logdst_parse(config_t *, const char *) NONNULL(1,2) WUNRES;
const char *logdst_s(config_t *) NONNULL(1);
int log_init(config_t *) NONNULL(1) WUNRES;
int log_reinit(void) WUNRES;
void log_fini(void);
typedef struct {
uint32_t qsize;
uint64_t errors;
uint64_t counts[LOGEVT_SIZE];
} log_stat_t;
void log_submit(void *) NONNULL(1);
void log_stats(log_stat_t *) NONNULL(1);
void log_version(FILE *) NONNULL(1);
int log_event_xnumon_start(void) WUNRES;
int log_event_xnumon_stop(void) WUNRES;
int log_event_xnumon_stats(void) WUNRES;
#endif