This repository has been archived by the owner on Sep 30, 2022. It is now read-only.
-
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.
refactor: allow lowercase log levels
- Loading branch information
1 parent
82380e3
commit 2de2caf
Showing
21 changed files
with
269 additions
and
63 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,8 +1,8 @@ | ||
import log from '@flex-development/log' | ||
import log, { LogLevel } from '@flex-development/log' | ||
|
||
/** | ||
* @file Examples - error log | ||
* @module log/docs/examples/error | ||
*/ | ||
|
||
log('error log', { level: 'ERROR' }) | ||
log('error log', { level: LogLevel.ERROR }) |
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,8 +1,8 @@ | ||
import log from '@flex-development/log' | ||
import log, { LogLevel } from '@flex-development/log' | ||
|
||
/** | ||
* @file Examples - info log | ||
* @module log/docs/examples/info | ||
*/ | ||
|
||
log('info log', { level: 'INFO' }) | ||
log('info log', { level: LogLevel.INFO }) |
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,8 +1,8 @@ | ||
import log from '@flex-development/log' | ||
import log, { LogLevel } from '@flex-development/log' | ||
|
||
/** | ||
* @file Examples - success log | ||
* @module log/docs/examples/success | ||
*/ | ||
|
||
log('success log', { level: 'SUCCESS' }) | ||
log('success log', { level: LogLevel.SUCCESS }) |
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,8 +1,8 @@ | ||
import log from '@flex-development/log' | ||
import log, { LogLevel } from '@flex-development/log' | ||
|
||
/** | ||
* @file Examples - warning log | ||
* @module log/docs/examples/warning | ||
*/ | ||
|
||
log('warning log', { level: 'WARN' }) | ||
log('warning log', { level: LogLevel.WARN }) |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { LogLevel } from '@log/enums/log-level.enum' | ||
|
||
/** | ||
* @file Type Definitions - Level | ||
* @module log/types/Level | ||
*/ | ||
|
||
/** | ||
* Log levels. | ||
*/ | ||
export type Level = keyof typeof LogLevel | LogLevel |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* @file Entry Point - Type Definitions | ||
* @module log/types | ||
*/ | ||
|
||
export type { Level } from './Level' |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* @file User Module Mock - normalizeOptions | ||
* @module utils/mocks/normalizeOptions | ||
* @see https://jestjs.io/docs/manual-mocks#mocking-user-modules | ||
*/ | ||
|
||
export default jest.fn((...args) => { | ||
return jest.requireActual('../normalize-options.util').default(...args) | ||
}) |
Oops, something went wrong.