A frequently used log configuration. Adding Date Time. Adding warnings and errors to file. Infos are green.
Repository
Current version released
10 months ago
Dependencies
std
Logger
Usage Example
import { Logger } from 'https://deno.land/x/log/mod.ts'
const minLevelConsole = 'DEBUG'
const minLevelFile = 'WARNING'
const fileName = "./warnings-errors.txt"
const pure = true // leaving out e.g. the time info
export const logger = await Logger.getInstance(minLevelConsole, minLevelFile, fileName, pure)
logger.debug('example debug message')
logger.info('example info')
logger.warning('example warning')
logger.error('example error message')
logger.critical('example critical message')
Trigger Usage Example
deno run --allow-read --allow-write https://deno.land/x/log/usage-example.ts
Donations
Thanks to Freedom Cash, we are already free.
If you want to donate, you might consider donating to the otherparty.co.uk to ensure people do not need to donate to victims but rather donate successfully to problem solvers.