This commit is contained in:
2026-01-25 13:42:28 +01:00
parent 4dbf566f0c
commit c074a5d935
13 changed files with 383 additions and 12 deletions

View File

@@ -4,6 +4,8 @@ import { UmamiAnalyticsService } from './analytics/umami-analytics-service';
import { MemoryCacheService } from './cache/memory-cache-service';
import { GlitchtipErrorReportingService } from './errors/glitchtip-error-reporting-service';
import { NoopErrorReportingService } from './errors/noop-error-reporting-service';
import { NoopLoggerService } from './logging/noop-logger-service';
import { PinoLoggerService } from './logging/pino-logger-service';
/**
* Singleton instance of AppServices.
@@ -93,7 +95,12 @@ export function getAppServices(): AppServices {
// Use [`getServerAppServices()`](lib/services/create-services.server.ts:1) on the server.
const cache = new MemoryCacheService();
const logger =
typeof window === 'undefined'
? new PinoLoggerService('server')
: new NoopLoggerService();
// Create and cache the singleton
singleton = new AppServices(analytics, errors, cache);
singleton = new AppServices(analytics, errors, cache, logger);
return singleton;
}