docs(log): document method signature

This commit is contained in:
Julien Fontanet 2024-02-13 17:35:58 +01:00
parent b4e1064914
commit 93dd1a63da
2 changed files with 20 additions and 0 deletions

View File

@ -27,6 +27,16 @@ log.error('could not join server', {
})
```
A logging method has the following signature:
```ts
interface LoggingMethod {
(error): void
(message: string, data?: { error?: Error; [property: string]: any }): void
}
```
### Consumer
Then, at application level, configure the logs are handled:

View File

@ -45,6 +45,16 @@ log.error('could not join server', {
})
```
A logging method has the following signature:
```ts
interface LoggingMethod {
(error): void
(message: string, data?: { error?: Error; [property: string]: any }): void
}
```
### Consumer
Then, at application level, configure the logs are handled: