logging
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user