Commit 7489dd18 by G

configure logger, currently only for dev

parent a099b65f
import { configLoggerType, consoleTransport, logger } from "react-native-logs";
const levels = {
error: 6,
warn: 5,
info: 4,
http: 3,
verbose: 2,
debug: 1,
silly: 0
};
const colors = {
error: "redBright",
warn: "yellowBright",
info: "whiteBright",
http: "blueBright",
verbose: "cyanBright",
debug: "greenBright",
silly: "magentaBright"
};
const defaultConfig : configLoggerType = {
levels,
severity : "silly",
transport : consoleTransport,
transportOptions : {
colors
},
async : true,
dateFormat : "iso",
printLevel : true,
printDate : true,
enabled : true,
}
const LOG = logger.createLogger<keyof typeof levels>(defaultConfig);
export { LOG };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment