# devkit-logging

> ## Example Logger Usage

Latest version **1.0.0** (published 2016-03-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install devkit-logging
pnpm add devkit-logging
yarn add devkit-logging
bun add devkit-logging
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-03-06 |
| First published | 2016-03-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yofreke |
| Maintainers | yofreke |
| Keywords | logging, logger |

## Links

- npm: https://www.npmjs.com/package/devkit-logging
- Repository: https://github.com/gameclosure/devkit-logging
- Homepage: https://github.com/gameclosure/devkit-logging#readme
- Issues: https://github.com/gameclosure/devkit-logging/issues
- npm.io page: https://npm.io/package/devkit-logging

## Dependencies (4)

- [eyes](https://npm.io/package/eyes.md) git+https://github.com/weebygames/eyes.js.git
- [chalk](https://npm.io/package/chalk.md) ^1.1.1
- [printf](https://npm.io/package/printf.md) ^0.2.3
- [callsite](https://npm.io/package/callsite.md) ^1.0.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-03-06

## README

# Useful logger!

## Example Logger Usage

``` javascript
var logging = require('devkit-logging');

var logger = logging.get('test');

logging.setDefaultLevel('silly');

var arr = [4, 67, 8, 9];
logger.silly('an array?', arr);

var obj = {
  x: 3,
  y: 7,
  data: {
    beep: 'boop'
  }
};
logger.debug('an object?', obj);

for (var i = 0; i < 3; i++) {
  logger.info('hello world!', i);
}

logger.warn('hello world!');

var err = new Error('Some error');
logger.error('oh no!', err);

```


## Example Trace Usage

### Notes

A global `trace(...)` function is exposed, and can be used to filter out particularly verbose development logs.  Trace uses environment variables by default, but can also be invoked programatically.

`DEVKIT_TRACE` {Boolean}

- Whether or not to show trace logs

`DEVKIT_TRACE_NAMES` {String}

- Comma separated list of paths to show traces for.
- If no names are specified, traces for all paths will be shown.


### Usage

#### With environment variables:

Start app with environment variables set

`DEVKIT_TRACE=true DEVKIT_TRACE_NAMES=index.js,someFolder node src/index.js`

#### Without environment variables:

``` javascript
// NOTE: Must require logging before trying to call trace()
var logging = require('devkit-logging');

logging.setTraceEnabled(true);

trace('something');


```

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