Logger constructor
Logger({
- required bool debugLogs,
Implementation
Logger({required bool debugLogs}){
doLog = (message, Level level, {additionalData}) {
if (level != Level.debug || debugLogs) {
print("Askless [${level.toString().split(".").last.toUpperCase()}]: $message");
if (additionalData != null) {
print(additionalData.toString());
}
}
};
if (debugLogs) {
doLog(
'**********************************************************************************' +
'** WARNING: debugLogs is true, set it to false in a production environment ** **\n' +
'**********************************************************************************',
Level.warning,
);
}
}