log static method
void
log(})
Default color log
@paramcolorInt
: 0 to 107
@paramisLog
: if set to true, the static enable is true or not, log anyway.
Implementation
static void log(
String msg, {
DevLevel level = DevLevel.logNor,
bool? isLog,
int? colorInt,
String? fileLocation,
DateTime? time,
int? sequenceNumber,
String? name,
Zone? zone,
Object? error,
StackTrace? stackTrace,
bool? execFinalFunc,
}) {
int ci = colorInt ?? (_logColorMap[level] ?? defaultColorInt);
final String fileInfo = Dev.isLogFileLocation ?
(fileLocation != null ? '($fileLocation): ' : '(${StackTrace.current.toString().split('\n')[1].split('/').last}: ')
: '';
final levelMap = {DevLevel.logWar: 1000, DevLevel.logErr: 2000};
final theName = name ?? level.toString().split('.').last;
DevColorizedLog.logCustom(
msg,
enable: Dev.enable,
colorInt: execFinalFunc != null && execFinalFunc ? _exeColorMap[level]! : ci,
isLog: isLog,
fileInfo: fileInfo,
time: time,
sequenceNumber: sequenceNumber,
level: levelMap[level] ?? 0,
name: theName,
zone: zone,
error: error,
stackTrace: stackTrace,
execFinalFunc: execFinalFunc,
);
}