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.
22 lines
491 B
22 lines
491 B
#ifndef LOGGER_HPP_INCLUDED
|
|
#define LOGGER_HPP_INCLUDED
|
|
|
|
#include <cstdio>
|
|
|
|
extern int verbose;
|
|
|
|
#define LogDebug(s, ...) \
|
|
if ( verbose >= 3 ) printf(s, ##__VA_ARGS__);
|
|
|
|
#define LogMoreInfo(s, ...) \
|
|
if ( verbose >= 2 ) printf(s, ##__VA_ARGS__);
|
|
|
|
#define LogInfo(s, ...) \
|
|
if ( verbose >= 1 ) printf(s, ##__VA_ARGS__);
|
|
|
|
#define LogError(s, ...) \
|
|
if ( verbose >= 0 ) { printf("%s, %s(), %d: ", __FILE__, __func__, __LINE__); printf(s, ##__VA_ARGS__); }
|
|
|
|
|
|
|
|
#endif // LOGGER_HPP_INCLUDED
|
|
|