https://github.com/dance-planner/log
A frequently used log configuration. Adding Date Time. Adding warnings and errors to file. Infos are green.
https://github.com/dance-planner/log
logging
Last synced: 4 months ago
JSON representation
A frequently used log configuration. Adding Date Time. Adding warnings and errors to file. Infos are green.
- Host: GitHub
- URL: https://github.com/dance-planner/log
- Owner: dance-planner
- License: mit
- Created: 2020-08-29T14:28:33.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-17T14:46:40.000Z (over 2 years ago)
- Last Synced: 2026-02-12T07:04:55.759Z (4 months ago)
- Topics: logging
- Language: TypeScript
- Homepage:
- Size: 22.5 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Logger

## Usage Example
```ts
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
```sh
deno run --allow-read --allow-write https://deno.land/x/log/usage-example.ts
```
## Donations
Thanks to [Freedom Cash](https://FreedomCash.org), we are already free.
If you want to donate, you might consider donating to the [otherparty.co.uk](https://www.otherparty.co.uk/donate-crypto-the-other-party) to ensure people do not need to donate to victims but rather donate successfully to problem solvers.
