# yacon

> Yet another colored console logger.

Latest version **1.0.1** (published 2013-04-09) · 0 weekly downloads

## Install

```sh
npm install yacon
pnpm add yacon
yarn add yacon
bun add yacon
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2013-04-09 |
| First published | 2013-04-08 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.8.x |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jakob Borg |
| Maintainers | calmh |

## Links

- npm: https://www.npmjs.com/package/yacon
- Repository: https://github.com/calmh/node-yacon
- npm.io page: https://npm.io/package/yacon

## Dependencies (2)

- [colors](https://npm.io/package/colors.md) ~0.6.0-1
- [callsite](https://npm.io/package/callsite.md) ~1.0.0

## Recent versions

- 1.0.1 (latest) — 2013-04-09
- 1.0.0 — 2013-04-08

## README

yacon
=====

This is yet another console logging / debugging module. It has the
following features:

 - `util.format()` formatting.
 - Optional timestamping.
 - Optional call site printing.
 - Optional coloring.
 - Debug output can be enabled in code or via environment variable.

Functions
---------

### enableDebug()

Enables output of `.debug()` calls and adds callsite information to all
lines. Can also be enabled by setting the environment variable `DEBUG` to
anything.

### enableTimestamps()

Enables output of ISO8601 timestamps at the start of every line. Can
also be enabled by setting the environment variable `DEBUG` to
`timestamps`.

### debug(), ok(), info(), warning(), error(), fatal()

Output the arguments in the same way as `util.format()`, preceded by the
specified level keyword. `debug()` will be silent unless debug output
has been enabled. `fatal()` will never return.

Example
-------

```javascript
var con = require('./lib/yacon.js');

function main() {
    con.debug('Debug output: %j', {obj: {foo: 42}});
    con.ok('Good stuff');
    con.info('Informational');
    con.warning('Warning');
    con.error('Error');
    con.fatal('Fatal (program will exit)');
    con.info('We never get here');
}

main();
```

![Example Output](https://raw.github.com/calmh/node-yacon/master/example.png)
 
License
-------

MIT

---
_Source: https://npm.io/package/yacon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
