print static method

void print(
  1. Object? object, {
  2. DevLevel level = DevLevel.logNor,
  3. bool? isLog,
  4. String? fileLocation,
  5. bool? isDebug,
  6. bool? execFinalFunc,
})

log supportting on multiple consoles @paramisDebug: default printing only on debug mode, not set using @param static isDebugPrint.

Implementation

static void print(
  Object? object, {
  DevLevel level = DevLevel.logNor,
  bool? isLog,
  String? fileLocation,
  bool? isDebug,
  bool? execFinalFunc
  }) {
  final String fileInfo = Dev.isLogFileLocation ?
  (fileLocation != null ? '($fileLocation): ' : '(${StackTrace.current.toString().split('\n')[1].split('/').last}: ')
   : '';
  String msg = "$object";
  bool? isDbgPrint = isDebug ?? Dev.isDebugPrint;
  var name = level.toString().split('.').last;

  final prefix = isDbgPrint == null || isDbgPrint ? 'dbgPrt' : 'unlPrt';
  name = name.replaceAll('log', prefix);

  DevColorizedLog.logCustom(
    msg,
    enable: Dev.enable,
    isLog: isLog,
    isMultConsole: true,
    isDebugPrint: isDbgPrint,
    fileInfo: fileInfo,
    name: name,
    execFinalFunc: execFinalFunc,
  );
}