From 135bdbfdc7d10841ef67e4874afb2185e7264c93 Mon Sep 17 00:00:00 2001 From: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com> Date: Sat, 19 Oct 2024 19:16:47 +0200 Subject: [PATCH] docs: update custom logger documentation --- .../docs/documentation/custom-logger.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/site/angular-auth-oidc-client/docs/documentation/custom-logger.md b/docs/site/angular-auth-oidc-client/docs/documentation/custom-logger.md index 9e1fb2161..b5bbdcaf5 100644 --- a/docs/site/angular-auth-oidc-client/docs/documentation/custom-logger.md +++ b/docs/site/angular-auth-oidc-client/docs/documentation/custom-logger.md @@ -14,7 +14,28 @@ export class MyLoggerService implements AbstractLoggerService { } ``` -Then provide the class in the module: +## Usage + +### Standalone + +Include the logger class within the `ApplicationConfig`: + +```ts +export const appConfig: ApplicationConfig = { + providers: [ + provideAuth({ + config: { + // ... + }, + }), + { provide: AbstractLoggerService, useClass: MyLoggerService }, + ], +}; +``` + +### NgModule + +Provide the logger class in the module: ```ts @NgModule({