log level prop
This commit is contained in:
@@ -2,7 +2,7 @@ import log from "loglevel";
|
||||
import { apply, reg } from "loglevel-plugin-prefix";
|
||||
|
||||
export function initLogger() {
|
||||
log.setLevel(process.env.NODE_ENV === 'production' ? 'info' : 'trace');
|
||||
log.setLevel(import.meta.env.VITE_LOG_LEVEL ?? 'info');
|
||||
reg(log);
|
||||
apply(log, {template: '[%t] %l:'});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user