1 | WDIO Logger Utility
|
2 | ===================
|
3 |
|
4 | > A helper utility for logging of WebdriverIO packages
|
5 |
|
6 | This package is used across all WebdriverIO packages to log information using the [`loglevel`](https://www.npmjs.com/package/loglevel) package. It can also be used for any other arbitrary Node.js project.
|
7 |
|
8 | ## Install
|
9 |
|
10 | To install the package just call
|
11 |
|
12 | ```sh
|
13 | npm install @wdio/logger
|
14 | ```
|
15 |
|
16 | or when adding it to a WebdriverIO subpackage:
|
17 |
|
18 | ```sh
|
19 | lerna add @wdio/logger --scope <subpackage>
|
20 | ```
|
21 |
|
22 | ## Usage
|
23 |
|
24 | The package exposes a logger function that you can use to register an instance for your scoped package:
|
25 |
|
26 | ```js
|
27 | import logger from '@wdio/logger'
|
28 |
|
29 | const log = logger('myPackage')
|
30 | log.info('some logs')
|
31 | ```
|
32 |
|
33 | For more info see [`loglevel`](https://www.npmjs.com/package/loglevel) package on NPM.
|