30#define LOGLEVEL_BODYGUARD LOG_DEBUG
31#define LOGLEVEL_UNIT LOG_DEBUG
32#define LOGLEVEL_GOTO LOG_DEBUG
33#define LOGLEVEL_CITY LOG_DEBUG
34#define LOGLEVEL_BUILD LOG_DEBUG
35#define LOGLEVEL_HUNT LOG_DEBUG
36#define LOGLEVEL_PLAYER LOG_DEBUG
38#define LOG_AI_TEST LOG_NORMAL
81 const struct city *pcity,
const char *msg, ...)
83#define CITY_LOG(loglevel, pcity, msg, ...) \
85 bool notify = pcity->server.debug; \
86 enum log_level level = (notify ? LOG_AI_TEST \
87 : MIN(loglevel, LOGLEVEL_CITY)); \
88 if (log_do_output_for_level(level)) { \
89 real_city_log(__FILE__, __FUNCTION__, __FC_LINE__, level, notify, \
90 pcity, msg, ## __VA_ARGS__); \
96 const struct unit *
punit,
const char *msg, ...)
98#define UNIT_LOG(loglevel, punit, msg, ...) \
100 bool notify = punit->server.debug; \
101 enum log_level level; \
102 if (notify || (tile_city(unit_tile(punit)) \
103 && tile_city(unit_tile(punit))->server.debug)) { \
104 level = LOG_AI_TEST; \
107 level = MIN(loglevel, LOGLEVEL_UNIT); \
109 if (log_do_output_for_level(level)) { \
110 real_unit_log(__FILE__, __FUNCTION__, __FC_LINE__, level, notify, \
111 punit, msg, ## __VA_ARGS__); \
122#define TIMING_LOG(timer, activity) timing_log_real(timer, activity)
123#define TIMING_RESULTS() timing_results_real()
125#define TIMING_LOG(timer, activity)
126#define TIMING_RESULTS()
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct setting_list * level[OLEVELS_NUM]
void timing_log_init(void)
void real_city_log(const char *file, const char *function, int line, enum log_level level, bool notify, const struct city *pcity, const char *msg,...) fc__attribute((__format__(__printf__
void real_unit_log(const char *file, const char *function, int line, enum log_level level, bool notify, const struct unit *punit, const char *msg,...) fc__attribute((__format__(__printf__
void timing_log_free(void)
void timing_results_real(void)
void timing_log_real(enum ai_timer timer, enum ai_timer_activity activity)