logging.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /** \file logging.h
  2. * \brief Header: provides a log file to ease tracing the program
  3. */
  4. #ifndef MC_LOGGING_H
  5. #define MC_LOGGING_H
  6. /*
  7. This file provides an easy-to-use function for writing all kinds of
  8. events into a central log file that can be used for debugging.
  9. */
  10. /*** typedefs(not structures) and defined constants **********************************************/
  11. #define mc_log_mark() mc_log("%s:%d\n",__FILE__,__LINE__)
  12. /*** enums ***************************************************************************************/
  13. /*** structures declarations (and typedefs of structures)*****************************************/
  14. /*** global variables defined in .c file *********************************************************/
  15. /*** declarations of public functions ************************************************************/
  16. /* *INDENT-OFF* */
  17. void mc_log (const char *fmt, ...) G_GNUC_PRINTF (1, 2);
  18. void mc_always_log (const char *fmt, ...) G_GNUC_PRINTF (1, 2);
  19. /* *INDENT-ON* */
  20. /*** inline functions ****************************************************************************/
  21. #endif