#include <stdarg.h>
#include "astring.h"
#include "log.h"
#include "shared.h"
#include "support.h"
#include "timing.h"
#include "ai.h"
#include "city.h"
#include "game.h"
#include "map.h"
#include "unit.h"
#include "notify.h"
#include "srv_main.h"
#include "advdata.h"
#include "srv_log.h"
Go to the source code of this file.
|
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,...) |
|
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,...) |
|
void | timing_log_real (enum ai_timer timer, enum ai_timer_activity activity) |
|
void | timing_results_real (void) |
|
void | timing_log_init (void) |
|
void | timing_log_free (void) |
|
◆ AILOG_OUT
#define AILOG_OUT |
( |
|
text, |
|
|
|
which |
|
) |
| |
Value: fc_snprintf(buf,
sizeof(buf),
" %s: %g sec turn, %g sec game", text, \
notify_conn(NULL, NULL, E_AI_DEBUG,
ftc_log,
"%s", buf);
const struct ft_color ftc_log
static struct timer * aitimer[AIT_LAST][2]
int fc_snprintf(char *str, size_t n, const char *format,...)
double timer_read_seconds(struct timer *t)
◆ real_city_log()
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, |
|
|
|
... |
|
) |
| |
Log city messages, they will appear like this 2: Polish Romenna(5,35) [s1 d106 u11 g1] must have Archers ...
Definition at line 52 of file srv_log.c.
◆ real_unit_log()
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, |
|
|
|
... |
|
) |
| |
Log unit messages, they will appear like this 2: Polish Archers[139] (5,35)->(0,0){0,0} stays to defend city where [] is unit id, ()->() are coordinates present and goto, and {,} contains bodyguard and ferryboat ids.
Definition at line 86 of file srv_log.c.
◆ timing_log_free()
void timing_log_free |
( |
void |
| ) |
|
◆ timing_log_init()
void timing_log_init |
( |
void |
| ) |
|
◆ timing_log_real()
Measure the time between the calls. Used to see where in the AI too much CPU is being used.
Definition at line 128 of file srv_log.c.
◆ timing_results_real()
void timing_results_real |
( |
void |
| ) |
|
◆ aitimer
◆ recursion