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

Logger

Frequently used configuration:
Writing warnings + errors into file. Adding date and time.

Usage Example

import { getLogger } from 'https://deno.land/x/log/mod.ts'

const logger = await getLogger()

logger.debug('example debug message')
logger.info('example info')
logger.warning('example warning')
logger.error('example error message')
logger.critical('example critical message')

// warnings + errors are additionally written to ./log.txt file 

Trigger Usage Example

deno run --allow-read --allow-write usage-example.ts

Support my Open Source Contributions

If you like my work please consider downloading the brave browser via my promotion link: https://brave.com/fan464.

![](https://brave.com/)