#include "support.h"
#include "tech.h"
#include <QLoggingCategory>
Go to the source code of this file.
|
| #define | TECH_LOG(ait, _, pplayer, padvance, msg, ...) |
| |
| #define | DIPLO_LOG(ait, loglevel, pplayer, aplayer, msg, ...) |
| |
| #define | BODYGUARD_LOG(ait, loglevel, punit, msg, ...) |
| |
|
| void | dai_city_log (struct ai_type *ait, char *buffer, int buflength, const struct city *pcity) |
| | Produce logline fragment for srv_log. More...
|
| |
| void | dai_unit_log (struct ai_type *ait, char *buffer, int buflength, const struct unit *punit) |
| | Produce logline fragment for srv_log. More...
|
| |
| QString | tech_log_prefix (ai_type *ait, const player *pplayer, advance *padvance) |
| | Log player tech messages. More...
|
| |
| QString | diplo_log_prefix (ai_type *ait, const player *pplayer, const player *aplayer) |
| | Log player messages, they will appear like this. More...
|
| |
| QString | bodyguard_log_prefix (ai_type *ait, const unit *punit) |
| | Log message for bodyguards. More...
|
| |
◆ BODYGUARD_LOG
| #define BODYGUARD_LOG |
( |
|
ait, |
|
|
|
loglevel, |
|
|
|
punit, |
|
|
|
msg, |
|
|
|
... |
|
) |
| |
Value: { \
bool notify = punit->server.debug; \
+ QStringLiteral(" ") \
+ QString::asprintf(msg, ##__VA_ARGS__); \
if (notify) { \
qCInfo(ai_category).noquote() <<
message; \
notify_conn(
nullptr,
nullptr, E_AI_DEBUG,
ftc_log,
"%s", \
} else { \
qCDebug(ai_category).noquote() <<
message; \
} \
}
QString bodyguard_log_prefix(ai_type *ait, const unit *punit)
Log message for bodyguards.
const struct ft_color ftc_log
Definition at line 65 of file ailog.h.
◆ DIPLO_LOG
| #define DIPLO_LOG |
( |
|
ait, |
|
|
|
loglevel, |
|
|
|
pplayer, |
|
|
|
aplayer, |
|
|
|
msg, |
|
|
|
... |
|
) |
| |
Value: { \
+ QStringLiteral(" ") \
+ QString::asprintf(msg, ##__VA_ARGS__); \
if (notify) { \
qCInfo(ai_category).noquote() <<
message; \
notify_conn(
nullptr,
nullptr, E_AI_DEBUG,
ftc_log,
"%s", \
} else { \
qCDebug(ai_category).noquote() <<
message; \
} \
}
QString diplo_log_prefix(ai_type *ait, const player *pplayer, const player *aplayer)
Log player messages, they will appear like this.
bool BV_ISSET(const BV &bv, int bit)
Definition at line 49 of file ailog.h.
◆ TECH_LOG
| #define TECH_LOG |
( |
|
ait, |
|
|
|
_, |
|
|
|
pplayer, |
|
|
|
padvance, |
|
|
|
msg, |
|
|
|
... |
|
) |
| |
Value: { \
+ QStringLiteral(" ") \
+ QString::asprintf(msg, ##__VA_ARGS__); \
if (notify) { \
qCInfo(ai_category).noquote() <<
message; \
notify_conn(
nullptr,
nullptr, E_AI_DEBUG,
ftc_log,
"%s", \
} else { \
qCDebug(ai_category).noquote() <<
message; \
} \
}
QString tech_log_prefix(ai_type *ait, const player *pplayer, advance *padvance)
Log player tech messages.
Definition at line 32 of file ailog.h.
◆ bodyguard_log_prefix()
| QString bodyguard_log_prefix |
( |
ai_type * |
ait, |
|
|
const unit * |
punit |
|
) |
| |
Log message for bodyguards.
They will appear like this Polish Mech. Inf.[485] bodyguard (38,22){Riflemen:574@37,23} note that these messages are likely to wrap if long.
Definition at line 98 of file ailog.cpp.
◆ dai_city_log()
| void dai_city_log |
( |
struct ai_type * |
ait, |
|
|
char * |
buffer, |
|
|
int |
buflength, |
|
|
const struct city * |
pcity |
|
) |
| |
◆ dai_unit_log()
| void dai_unit_log |
( |
struct ai_type * |
ait, |
|
|
char * |
buffer, |
|
|
int |
buflength, |
|
|
const struct unit * |
punit |
|
) |
| |
◆ diplo_log_prefix()
Log player messages, they will appear like this.
where ti is timer, co countdown and lo love for target, who is e.
Definition at line 78 of file ailog.cpp.
◆ tech_log_prefix()
Log player tech messages.
Definition at line 56 of file ailog.cpp.