1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

chore(mobile): rename log enum to lowercase (#16476)

* chore(mobile): rename log enum to lowercase

* chore(mobile): do not abbreviate

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-03-02 18:00:48 +05:30
committed by GitHub
parent 6cc1978b2d
commit d8d87bb565
9 changed files with 80 additions and 89 deletions

View File

@@ -39,29 +39,29 @@ class LogService {
}
static Future<LogService> init({
required ILogRepository logRepo,
required IStoreRepository storeRepo,
required ILogRepository logRepository,
required IStoreRepository storeRepository,
bool shouldBuffer = true,
}) async {
if (_instance != null) {
return _instance!;
}
_instance = await create(
logRepo: logRepo,
storeRepo: storeRepo,
logRepository: logRepository,
storeRepository: storeRepository,
shouldBuffer: shouldBuffer,
);
return _instance!;
}
static Future<LogService> create({
required ILogRepository logRepo,
required IStoreRepository storeRepo,
required ILogRepository logRepository,
required IStoreRepository storeRepository,
bool shouldBuffer = true,
}) async {
final instance = LogService._(logRepo, storeRepo, shouldBuffer);
final instance = LogService._(logRepository, storeRepository, shouldBuffer);
// Truncate logs to 250
await logRepo.truncate(limit: kLogTruncateLimit);
await logRepository.truncate(limit: kLogTruncateLimit);
// Get log level from store
final level = await instance._storeRepository.tryGet(StoreKey.logLevel);
if (level != null) {
@@ -145,7 +145,7 @@ class LoggerUnInitializedException implements Exception {
extension LevelDomainToInfraExtension on Level {
LogLevel toLogLevel() =>
LogLevel.values.elementAtOrNull(Level.LEVELS.indexOf(this)) ??
LogLevel.INFO;
LogLevel.info;
}
extension on LogLevel {