Smart-Home am Beispiel der Präsenzerkennung im Raum Projektarbeit Lennart Heimbs, Johannes Krug, Sebastian Dohle und Kevin Holzschuh bei Prof. Oliver Hofmann SS2019
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

log.h 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 <henrik.ekblad@mysensors.org>
  9. * Copyright (C) 2013-2018 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. #ifndef LOG_H
  20. #define LOG_H
  21. #include <stdarg.h>
  22. #include <stdio.h>
  23. #include <syslog.h>
  24. #include <stdint.h>
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #define vlogError(...) vlog(LOG_ERR, __VA_ARGS__)
  29. #define vlogWarning(...) vlog(LOG_WARNING, __VA_ARGS__)
  30. #define vlogNotice(...) vlog(LOG_NOTICE, __VA_ARGS__)
  31. #define vlogInfo(...) vlog(LOG_INFO, __VA_ARGS__)
  32. #define vlogDebug(...) vlog(LOG_DEBUG, __VA_ARGS__)
  33. void logSetQuiet(uint8_t enable);
  34. void logSetLevel(int level);
  35. void logSetSyslog(int options, int facility);
  36. int logSetPipe(char *pipe_file);
  37. int logSetFile(char *file);
  38. void logClose(void);
  39. void vlog(int level, const char *fmt, va_list args);
  40. void logEmergency(const char *fmt, ...) __attribute__((format(printf,1,2)));
  41. void logAlert(const char *fmt, ...) __attribute__((format(printf,1,2)));
  42. void logCritical(const char *fmt, ...) __attribute__((format(printf,1,2)));
  43. void logError(const char *fmt, ...) __attribute__((format(printf,1,2)));
  44. void logWarning(const char *fmt, ...) __attribute__((format(printf,1,2)));
  45. void logNotice(const char *fmt, ...) __attribute__((format(printf,1,2)));
  46. void logInfo(const char *fmt, ...) __attribute__((format(printf,1,2)));
  47. void logDebug(const char *fmt, ...) __attribute__((format(printf,1,2)));
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif