refactor(logs): move to core package (#4586)

This commit is contained in:
Meier Lukas
2025-12-16 23:37:44 +01:00
committed by GitHub
parent d86af072bf
commit d348abfe4a
145 changed files with 971 additions and 708 deletions

View File

@@ -1,8 +1,11 @@
import { logger } from "@homarr/log";
import { createLogger } from "@homarr/core/infrastructure/logs";
import { ErrorWithMetadata } from "@homarr/core/infrastructure/logs/error";
import type { IconRepositoryLicense } from "../types/icon-repository-license";
import type { RepositoryIconGroup } from "../types/repository-icon-group";
const logger = createLogger({ module: "iconRepository" });
export abstract class IconRepository {
protected readonly allowedImageFileTypes = [".png", ".svg", ".jpeg"];
@@ -19,7 +22,9 @@ export abstract class IconRepository {
try {
return await this.getAllIconsInternalAsync();
} catch (err) {
logger.error(`Unable to request icons from repository "${this.slug}": ${JSON.stringify(err)}`);
logger.error(
new ErrorWithMetadata("Unable to request icons from repository", { slug: this.slug }, { cause: err }),
);
return {
success: false,
icons: [],