MySensors Library & Examples
2.3.2-62-ge298769
hal
architecture
Linux
drivers
core
log.h
1
/*
2
* The MySensors Arduino library handles the wireless radio link and protocol
3
* between your home built sensors/actuators and HA controller of choice.
4
* The sensors forms a self healing radio network with optional repeaters. Each
5
* repeater and gateway builds a routing tables in EEPROM which keeps track of the
6
* network topology allowing messages to be routed to nodes.
7
*
8
* Created by Henrik Ekblad <
[email protected]
>
9
* Copyright (C) 2013-2022 Sensnology AB
10
* Full contributor list: https://github.com/mysensors/MySensors/graphs/contributors
11
*
12
* Documentation: http://www.mysensors.org
13
* Support Forum: http://forum.mysensors.org
14
*
15
* This program is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU General Public License
17
* version 2 as published by the Free Software Foundation.
18
*/
19
20
#ifndef LOG_H
21
#define LOG_H
22
23
#include <stdarg.h>
24
#include <stdio.h>
25
#include <syslog.h>
26
#include <stdint.h>
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
#define vlogError(...) vlog(LOG_ERR, __VA_ARGS__)
33
#define vlogWarning(...) vlog(LOG_WARNING, __VA_ARGS__)
34
#define vlogNotice(...) vlog(LOG_NOTICE, __VA_ARGS__)
35
#define vlogInfo(...) vlog(LOG_INFO, __VA_ARGS__)
36
#define vlogDebug(...) vlog(LOG_DEBUG, __VA_ARGS__)
37
38
void
logSetQuiet(uint8_t enable);
39
void
logSetLevel(
int
level);
40
void
logSetSyslog(
int
options,
int
facility);
41
int
logSetPipe(
char
*pipe_file);
42
int
logSetFile(
char
*file);
43
void
logClose(
void
);
44
45
void
vlog(
int
level,
const
char
*fmt, va_list args);
46
void
logEmergency(
const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
47
void
logAlert(const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
48
void
logCritical(const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
49
void
logError(const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
50
void
logWarning(const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
51
void
logNotice(const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
52
void
logInfo(const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
53
void
logDebug(const
char
*fmt, ...)
__attribute__
((format(printf,1,2)));
54
55
#ifdef __cplusplus
56
}
57
#endif
58
59
#endif
__attribute__
FW config structure, stored in eeprom.
Definition:
MyOTAFirmwareUpdate.h:117
Copyright (C) 2013-2019 Sensnology AB. Generated by
doxygen
1.8.17