Skip to main content
Deno 2 is finally here 🎉️
Learn more

Logger

Screenshot from 2023-12-28 16-43-21

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.

direct-democracy