mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat: use ILoggerRepository (#8855)
* Migrate ImmichLogger over to injected ILoggerRepository * chore: cleanup and tests --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
parent
877207a2e6
commit
6e6deec40c
59 changed files with 352 additions and 191 deletions
|
|
@ -20,7 +20,7 @@ async function bootstrapMicroservices() {
|
|||
const host = String(process.env.HOST || '0.0.0.0');
|
||||
const port = Number(process.env.MICROSERVICES_PORT) || 3002;
|
||||
const app = await NestFactory.create(MicroservicesModule, { bufferLogs: true });
|
||||
const logger = app.get(ILoggerRepository);
|
||||
const logger = await app.resolve(ILoggerRepository);
|
||||
logger.setContext('ImmichMicroservice');
|
||||
app.useLogger(logger);
|
||||
app.useWebSocketAdapter(new WebSocketAdapter(app));
|
||||
|
|
@ -36,7 +36,7 @@ async function bootstrapApi() {
|
|||
const host = String(process.env.HOST || '0.0.0.0');
|
||||
const port = Number(process.env.SERVER_PORT) || 3001;
|
||||
const app = await NestFactory.create<NestExpressApplication>(ApiModule, { bufferLogs: true });
|
||||
const logger = app.get(ILoggerRepository);
|
||||
const logger = await app.resolve(ILoggerRepository);
|
||||
|
||||
logger.setContext('ImmichServer');
|
||||
app.useLogger(logger);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue