setLevelByValue method
Specifies the level of the log to be processed using Level.value.
If -[kPataInHex] is specified,
LogEnvironment.logLevel is used. (If not set, it defaults to Level.INFO)
Implementation
void setLevelByValue(int value) {
final tDefaultLogLevel = app.environment is LogEnvironment
? (app.environment as LogEnvironment).logLevel
: Level.INFO.value;
if (value == -kPataInHex) {
value = tDefaultLogLevel;
}
level = Level.LEVELS.firstWhere(
(v) => v.value == value,
orElse: () => Level('REMOTE', value),
);
}