feat: 切换邮箱认证并重构前后端启动与门禁
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import 'log_entry.dart';
|
||||
|
||||
enum LogOutput { console, file }
|
||||
|
||||
class LogConfig {
|
||||
final LogLevel minLevel;
|
||||
final LogOutput output;
|
||||
final String logFileName;
|
||||
final String logDir;
|
||||
|
||||
const LogConfig({
|
||||
this.minLevel = LogLevel.debug,
|
||||
this.output = LogOutput.console,
|
||||
this.logFileName = 'app.log',
|
||||
this.logDir = 'logs',
|
||||
});
|
||||
|
||||
static LogConfig forDebug() =>
|
||||
const LogConfig(minLevel: LogLevel.debug, output: LogOutput.console);
|
||||
|
||||
static LogConfig forRelease() => const LogConfig(
|
||||
minLevel: LogLevel.warning,
|
||||
output: LogOutput.file,
|
||||
logFileName: 'app.log',
|
||||
logDir: 'logs',
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user