Merged in feat/sw-3269-info-logs (pull request #2657)
feat/#sw-3269 fix: info logs * feat/#sw-3269 fix: info logs Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -26,6 +26,11 @@ export function createLogger(loggerPrefix: string | (() => Promise<string>)) {
|
||||
},
|
||||
|
||||
async info(message: string, ...args: unknown[]): Promise<void> {
|
||||
// TODO: Make this configurable
|
||||
if (process.env.NODE_ENV !== "development") {
|
||||
return
|
||||
}
|
||||
|
||||
console.info(`${await getLoggerPrefix()} ${message}`.trim(), ...args)
|
||||
},
|
||||
async warn(message: string, ...args: unknown[]): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user