prettyLogFile function
Logs a formatted map message
to the console when in debug mode.
Uses a ServerLog
instance to print the message prettily,
followed by a decorative line.
This function only runs in debug builds (kDebugMode
is true),
so it will not affect release performance.
Example:
prettyLogFile(message: {'event': 'user_login', 'userId': 123});
message
: A map of key-value pairs to log.
Implementation
dynamic prettyLogFile({required Map<String, dynamic> message}) {
if (kDebugMode) {
ServerLog log = ServerLog();
log.printPrettyMap(message);
log.printLine('╚');
}
}