Dev class
@param static enable: whether log msg. @param static isDebugPrint: whether the method Dev.print printing only on debug mode. @param static isLogFileLocation: whether log the location file info. @pararm static defaultColorInt: the color int of log text.
Constructors
- Dev()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- customFinalFunc ↔ dynamic Function(String, DevLevel)?
-
@deprecated Use exeFinalFunc instead. This will be removed in future versions.
getter/setter pair
- defaultColorInt ↔ int?
-
getter/setter pair
- enable ↔ bool
-
getter/setter pair
- exeFinalFunc ↔ dynamic Function(String, DevLevel)?
-
the custom final function to execute when log level meets the threshold
getter/setter pair
- exeLevel ↔ DevLevel
-
the lowest level threshold to execute the function of customFinalFunc
getter/setter pair
- isDebugPrint ↔ bool?
-
getter/setter pair
- isExeDiffColor ↔ bool
-
whether execFinalFunc log with different color
getter/setter pair
- isExeWithDateTime ↔ bool
-
whether execFinalFunc with date time
getter/setter pair
- isExeWithShowLog ↔ bool
-
whether execFinalFunc with showing log
getter/setter pair
- isLogFileLocation ↔ bool
-
getter/setter pair
- isLogShowDateTime ↔ bool
-
whether log the date time
getter/setter pair
- isMultConsoleLog ↔ bool
-
whether log with multiple consoles
getter/setter pair
- isReplaceNewline ↔ bool
-
whether replace newline characters and clean up whitespace for better search visibility in console
getter/setter pair
- newlineReplacement ↔ String
-
the character to replace newline characters with
getter/setter pair
- prefixName ↔ String
-
getter/setter pair
Static Methods
-
addCachedKey(
String key) → void - Add a keyword to cache
-
clearCachedKeys(
) → void - Clear all cached keywords
-
exe(
String msg, {String? name, DevLevel level = DevLevel.logNor, bool? isLog, bool? isMultConsole, bool? isDebug, int? colorInt, String? fileInfo, Object? error, StackTrace? stackTrace, String? printOnceIfContains}) → void -
Execute custom final func with purple text or blue text with mult console
@param
printOnceIfContains: if provided, only prints once when message contains this keyword -
exeBlink(
String msg, {bool? isLog, bool? isMultConsole, bool? isDebug, int? colorInt, String? printOnceIfContains}) → void -
exeError(
String msg, {bool? isLog, bool? isMultConsole, bool? isDebug, int? colorInt, Object? error, StackTrace? stackTrace, String? printOnceIfContains}) → void -
exeInfo(
String msg, {bool? isLog, bool? isMultConsole, bool? isDebug, int? colorInt, String? printOnceIfContains}) → void -
exeSuccess(
String msg, {bool? isLog, bool? isMultConsole, bool? isDebug, int? colorInt, String? printOnceIfContains}) → void -
exeWarning(
String msg, {bool? isLog, bool? isMultConsole, bool? isDebug, int? colorInt, String? printOnceIfContains}) → void -
hasCachedKey(
String key) → bool - Check if a keyword has been cached (logged once)
-
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, String? printOnceIfContains}) → void -
Default color log
@param
colorInt: 0 to 107 @paramisLog: if set to true, the static enable is true or not, log anyway. @paramprintOnceIfContains: if provided, only prints once when message contains this keyword -
logBlink(
String msg, {bool? isLog, bool? execFinalFunc, String? printOnceIfContains}) → void - Blink orange text
-
logError(
String msg, {bool? isLog, bool? execFinalFunc, Object? error, StackTrace? stackTrace, String? printOnceIfContains}) → void - Red text
-
logInfo(
String msg, {bool? isLog, bool? execFinalFunc, String? printOnceIfContains}) → void - Blue text
-
logSuccess(
String msg, {bool? isLog, bool? execFinalFunc, String? printOnceIfContains}) → void - Green text
-
logWarning(
String msg, {bool? isLog, bool? execFinalFunc, String? printOnceIfContains}) → void - Yellow text
-
print(
Object? object, {String? name, DevLevel level = DevLevel.logNor, int? colorInt, bool? isLog, String? fileLocation, bool? isDebug, bool? execFinalFunc, Object? error, StackTrace? stackTrace, String? printOnceIfContains}) → void -
log supportting on multiple consoles
@param
isDebug: default printing only on debug mode, not set using @param static isDebugPrint. @paramprintOnceIfContains: if provided, only prints once when message contains this keyword