-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog.h
74 lines (66 loc) · 2.05 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* log.h - Logging routines
* Copyright (c) 2020 Nicholas West, Hantao Cui, CURENT, et. al.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* This software is provided "as is" and the author disclaims all
* warranties with regard to this software including all implied warranties
* of merchantability and fitness. In no event shall the author be liable
* for any special, direct, indirect, or consequential damages or any
* damages whatsoever resulting from loss of use, data or profits, whether
* in an action of contract, negligence or other tortious action, arising
* out of or in connection with the use or performance of this software.
*/
/**
* @file log.h
* @brief Logging routines
* @author Nicholas West
* @date 2020
*
* Specifies miscellaneous logging routines to be used by
* @link dime_client_t @endlink and @link dime_server_t @endlink. These
* methods should not be called unless at least one "-v" flag was
* specified at runtime.
*/
#ifndef __DIME_log_H
#define __DIME_log_H
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Send a formated "INFO" line to stderr
*
* Prints a printf-formatted line containing verbose, non-issue
* information with a timestamp to standard error.
*
* @param fmt Format string
* @param ... Additional arguments
*/
void dime_info(const char *fmt, ...);
/**
* @brief Send a formated "WARN" line to stderr
*
* Prints a printf-formatted line containing non-critical warning
* information with a timestamp to standard error.
*
* @param fmt Format string
* @param ... Additional arguments
*/
void dime_warn(const char *fmt, ...);
/**
* @brief Send a formated "ERR" line to stderr
*
* Prints a printf-formatted line containing critical error information
* with a timestamp to standard error.
*
* @param fmt Format string
* @param ... Additional arguments
*/
void dime_err(const char *fmt, ...);
#ifdef __cplusplus
}
#endif
#endif