Freeciv-3.3
Loading...
Searching...
No Matches
Macros | Functions
dailog.h File Reference
#include "log.h"
#include "support.h"

Go to the source code of this file.

Macros

#define LOGLEVEL_TECH   LOG_DEBUG
 
#define TECH_LOG(ait, loglevel, pplayer, padvance, msg, ...)
 
#define DIPLO_LOG(ait, loglevel, pplayer, aplayer, msg, ...)
 
#define BODYGUARD_LOG(ait, loglevel, punit, msg, ...)
 

Functions

void dai_city_log (struct ai_type *ait, char *buffer, int buflength, const struct city *pcity)
 
void dai_unit_log (struct ai_type *ait, char *buffer, int buflength, const struct unit *punit)
 
void real_tech_log (struct ai_type *ait, const char *file, const char *function, int line, enum log_level level, bool send_notify, const struct player *pplayer, struct advance *padvance, const char *msg,...) fc__attribute((__format__(__printf__
 
void real_diplo_log (struct ai_type *ait, const char *file, const char *function, int line, enum log_level level, bool send_notify, const struct player *pplayer, const struct player *aplayer, const char *msg,...) fc__attribute((__format__(__printf__
 
void real_bodyguard_log (struct ai_type *ait, const char *file, const char *function, int line, enum log_level level, bool send_notify, const struct unit *punit, const char *msg,...) fc__attribute((__format__(__printf__
 

Macro Definition Documentation

◆ BODYGUARD_LOG

#define BODYGUARD_LOG (   ait,
  loglevel,
  punit,
  msg,
  ... 
)
Value:
{ \
: MIN(loglevel, LOGLEVEL_BODYGUARD)); \
msg, ## __VA_ARGS__); \
} \
}
char * incite_cost
Definition comments.c:76
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
Definition dialogs_g.h:74
#define __FC_LINE__
Definition log.h:41
#define log_do_output_for_level(level)
Definition log.h:90
log_level
Definition log.h:29
struct setting_list * level[OLEVELS_NUM]
Definition settings.c:190
#define MIN(x, y)
Definition shared.h:55
#define LOG_AI_TEST
Definition srv_log.h:38
#define LOGLEVEL_BODYGUARD
Definition srv_log.h:30
bool debug
Definition unit.h:237
struct unit::@84::@87 server

Definition at line 69 of file dailog.h.

◆ DIPLO_LOG

#define DIPLO_LOG (   ait,
  loglevel,
  pplayer,
  aplayer,
  msg,
  ... 
)
Value:
{ \
bool send_notify = BV_ISSET(pplayer->server.debug, PLAYER_DEBUG_DIPLOMACY); \
: MIN(loglevel, LOGLEVEL_PLAYER)); \
send_notify, pplayer, aplayer, msg, ## __VA_ARGS__); \
} \
}
#define BV_ISSET(bv, bit)
Definition bitvector.h:86
@ PLAYER_DEBUG_DIPLOMACY
Definition player.h:215
#define LOGLEVEL_PLAYER
Definition srv_log.h:36

Definition at line 53 of file dailog.h.

◆ LOGLEVEL_TECH

#define LOGLEVEL_TECH   LOG_DEBUG

Definition at line 22 of file dailog.h.

◆ TECH_LOG

#define TECH_LOG (   ait,
  loglevel,
  pplayer,
  padvance,
  msg,
  ... 
)
Value:
{ \
bool send_notify = BV_ISSET(pplayer->server.debug, PLAYER_DEBUG_TECH); \
: MIN(loglevel, LOGLEVEL_TECH)); \
send_notify, pplayer, padvance, msg, ## __VA_ARGS__); \
} \
}
#define LOGLEVEL_TECH
Definition dailog.h:22
@ PLAYER_DEBUG_TECH
Definition player.h:215

Definition at line 36 of file dailog.h.

Function Documentation

◆ dai_city_log()

void dai_city_log ( struct ai_type ait,
char buffer,
int  buflength,
const struct city pcity 
)

Produce logline fragment for srv_log.

Definition at line 41 of file dailog.c.

Referenced by cai_city_log(), and texwai_city_log().

◆ dai_unit_log()

void dai_unit_log ( struct ai_type ait,
char buffer,
int  buflength,
const struct unit punit 
)

Produce logline fragment for srv_log.

Definition at line 54 of file dailog.c.

Referenced by cai_unit_log(), and texwai_unit_log().

◆ real_bodyguard_log()

void real_bodyguard_log ( struct ai_type ait,
const char file,
const char function,
int  line,
enum log_level  level,
bool  send_notify,
const struct unit punit,
const char msg,
  ... 
)

◆ real_diplo_log()

void real_diplo_log ( struct ai_type ait,
const char file,
const char function,
int  line,
enum log_level  level,
bool  send_notify,
const struct player pplayer,
const struct player aplayer,
const char msg,
  ... 
)

◆ real_tech_log()

void real_tech_log ( struct ai_type ait,
const char file,
const char function,
int  line,
enum log_level  level,
bool  send_notify,
const struct player pplayer,
struct advance padvance,
const char msg,
  ... 
)