Skip to content

Commit

Permalink
Merge pull request #2031 from timdeschryver/docs/custom-logger
Browse files Browse the repository at this point in the history
docs: update custom logger documentation
  • Loading branch information
FabianGosebrink authored Oct 20, 2024
2 parents a426f38 + 135bdbf commit 51b039c
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 51b039c

Please sign in to comment.