# nuxt-log

> > A logger module for Nuxt.js using [vuejs-logger](https://github.com/justinkames/vuejs-logger)

Latest version **0.1.0** (published 2018-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install nuxt-log
pnpm add nuxt-log
yarn add nuxt-log
bun add nuxt-log
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-06-12 |
| First published | 2018-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | webcore-it |
| Keywords | log, logger, vue, nuxt, vuejs-logger |

## Links

- npm: https://www.npmjs.com/package/nuxt-log
- Repository: https://github.com/webcore-it/nuxt-log
- Issues: https://github.com/webcore-it/nuxt-log/issues
- npm.io page: https://npm.io/package/nuxt-log

## Dependencies (1)

- [vuejs-logger](https://npm.io/package/vuejs-logger.md) ^1.4.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
- [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
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-06-12
- 0.0.3 — 2018-06-12
- 0.0.2 — 2018-06-12
- 0.0.1 — 2018-06-12

## README

# nuxt-log

> A logger module for Nuxt.js using [vuejs-logger](https://github.com/justinkames/vuejs-logger)

## Setup
- Add `nuxt-log` dependency using yarn or npm to your project
- Add `nuxt-log` to `modules` section of `nuxt.config.js`

```js
const logOptions = {
  // optional : defaults to true if not specified
  isEnabled: true,
  // required ['debug', 'info', 'warn', 'error', 'fatal']
  logLevel : 'debug',
  // optional : defaults to false if not specified
  stringifyArguments : false,
  // optional : defaults to false if not specified
  showLogLevel : false,
  // optional : defaults to false if not specified
  showMethodName : false,
  // optional : defaults to '|' if not specified
  separator: '|',
  // optional : defaults to false if not specified
  showConsoleColors: false
}

{
  modules: [
   ['nuxt-log', logOptions],
  ]
}
```

## Usage
You can use **$log** in almost any context using `app.$log` or `this.$log`.

See [vuejs-logger official docs](https://github.com/justinkames/vuejs-logger) for more usage information.

```js
export default {
  data() {
    return {
      a: 'a',
      b: 'b',
    };
  },
  created() {
    this.$log.debug('test', this.a, 123);
    this.$log.info('test', this.b);
    this.$log.warn('test');
    this.$log.error('test');
    this.$log.fatal('test');
  },
};
```

## License

[MIT License](./LICENSE)

Copyright (c) webcore-it

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