2026-03-10 13:47:42 +07:00
|
|
|
#ifndef EA_ICT_CL__LOGGING_MQH
|
2026-03-10 20:39:33 +07:00
|
|
|
#define EA_ICT_CL__LOGGING_MQH
|
2026-03-10 13:47:42 +07:00
|
|
|
|
2026-03-10 20:39:33 +07:00
|
|
|
/** Prints message to Journal when enabled. */
|
2026-03-10 13:47:42 +07:00
|
|
|
inline void LogPrint(const bool enabled, const string msg)
|
|
|
|
|
{
|
2026-03-10 20:39:33 +07:00
|
|
|
if (!enabled) return;
|
|
|
|
|
Print(msg);
|
2026-03-10 13:47:42 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-10 20:39:33 +07:00
|
|
|
/** Prints formatted string (up to 3 string args) to Journal when enabled. */
|
2026-03-10 13:47:42 +07:00
|
|
|
inline void LogPrintF(const bool enabled, const string fmt, const string a0 = "", const string a1 = "", const string a2 = "")
|
|
|
|
|
{
|
2026-03-10 20:39:33 +07:00
|
|
|
if (!enabled) return;
|
|
|
|
|
Print(StringFormat(fmt, a0, a1, a2));
|
2026-03-10 13:47:42 +07:00
|
|
|
}
|
|
|
|
|
|
2026-03-10 20:39:33 +07:00
|
|
|
#endif
|