feat(server): log http exceptions (#9996)

This commit is contained in:
Jason Rasmussen 2024-06-05 17:07:47 -04:00 committed by GitHub
parent ce985ef8f8
commit 0f976edf96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 91 additions and 18 deletions

View file

@ -20,10 +20,10 @@ async function bootstrap() {
const port = Number(process.env.IMMICH_PORT) || 3001;
const app = await NestFactory.create<NestExpressApplication>(ApiModule, { bufferLogs: true });
const logger = await app.resolve(ILoggerRepository);
const logger = await app.resolve<ILoggerRepository>(ILoggerRepository);
logger.setAppName('ImmichServer');
logger.setContext('ImmichServer');
logger.setAppName('Api');
logger.setContext('Bootstrap');
app.useLogger(logger);
app.set('trust proxy', ['loopback', 'linklocal', 'uniquelocal']);
app.set('etag', 'strong');