-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/next-drupal-optional-authentication
- Loading branch information
Showing
4 changed files
with
54 additions
and
50 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,17 +1,22 @@ | ||
import type { Logger } from "./types" | ||
|
||
export const LOG_MESSAGE_PREFIX = "[next-drupal][log]:" | ||
export const DEBUG_MESSAGE_PREFIX = "[next-drupal][debug]:" | ||
export const WARN_MESSAGE_PREFIX = "[next-drupal][warn]:" | ||
export const ERROR_MESSAGE_PREFIX = "[next-drupal][error]:" | ||
|
||
// Default logger. Uses console. | ||
export const logger: Logger = { | ||
log(message) { | ||
console.log(`[next-drupal][log]:`, message) | ||
console.log(LOG_MESSAGE_PREFIX, message) | ||
}, | ||
debug(message) { | ||
console.debug(`[next-drupal][debug]:`, message) | ||
console.debug(DEBUG_MESSAGE_PREFIX, message) | ||
}, | ||
warn(message) { | ||
console.warn(`[next-drupal][debug]:`, message) | ||
console.warn(WARN_MESSAGE_PREFIX, message) | ||
}, | ||
error(message) { | ||
console.error(`[next-drupal][error]:`, message) | ||
console.error(ERROR_MESSAGE_PREFIX, message) | ||
}, | ||
} |
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