-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade logger, move to peer dep (PL-000) (#114)
Migration path: - Upgrade to `@voiceflow/[email protected]`, with new instantiation. - Remove exception middleware from express - Ensure `createHTTPLogger` is added to express BREAKING CHANGE: Move to `@voiceflow/logger` v2, as a peer dep. BREAKING CHANGE: Remove the exception middleware, as this same functionality is done better by the `pino-http` logger in `@voiceflow/logger`. Co-authored-by: Tyler Stewart <[email protected]>
- Loading branch information
Showing
13 changed files
with
228 additions
and
459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import Logger from '@voiceflow/logger'; | ||
import { createLogger, LogFormat, LogLevel } from '@voiceflow/logger'; | ||
|
||
const options = ['local', 'test'].includes(process.env.NODE_ENV!) ? { level: 'info' as any, pretty: true } : {}; | ||
|
||
const log = new Logger(options); | ||
const log = createLogger({ | ||
format: LogFormat.INLINE, | ||
level: (process.env.LOG_LEVEL as LogLevel) ?? LogLevel.INFO, | ||
}); | ||
|
||
export default log; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './exception'; | ||
export * from './rateLimit'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.