info static method
void
info(})
Implementation
static void info(dynamic message, {DateTime? time, Object? error, StackTrace? stackTrace, bool isReport = true, double? sampleRate = 1.0, required String actionModule, required String actionName}) {
if (isLogPathInitialized(message)) {
if (!shouldSample(sampleRate ?? 1.0)) {
return;
}
try {
if (isMobile) {
MXLogger.instance.info(message, name: actionModule, tag: actionName);
} else {
logger.i(
jsonEncode({
"time": time?.toIso8601String() ?? DateTime.now().toIso8601String(),
"sequence": _sequence,
"message": message,
"actionModule": actionModule,
"actionName": actionName,
"error": error.toString(),
"stackTrace": stackTrace?.toString(),
}),
time: time ?? DateTime.now(),
error: error,
stackTrace: stackTrace,
);
}
} catch (_) {}
if (isReport) {
_sequence++;
report(TCICLogParam(sequence: _sequence, module: actionModule, action: actionName, param: message, level: "info", code: 0, desc: "Info", stack: stackTrace.toString()));
}
}
}