Logging plugin for the Cisco Webex JS SDK.
npm install --save @webex/plugin-logger
This is a plugin for the Cisco Webex JS SDK . Please see our developer portal and the API docs for full details.
const Webex = require('webex');
const webex = Webex.init();
webex.logger.info('Hello World'); // => wx-js-sdk Hello World
This logger plugin supports different logging levels to control what gets output to the user's console:
-
silent
- Nothing prints to the console.
-
error [DEFAULT]
- Error messages thrown by exceptions. This level is meant for the developer and end user to help with troubleshooting.
- Example:
Unable to connect to websocket on port 4343
-
warn
- Warning messages meant to help guide developers away from potential errors.
- Example:
The usage of person email has been deprecated
-
log
- General output of logging messages.
- Example:
Websocket connected on port 4343
-
info
- More detailed logging of SDK information.
- Example:
Network status changed from DISCONNECTED to ONLINE
-
debug
- Developer specific information, helpful with debugging issues.
- Example:
Network packet received, contents: {data}
-
trace
- Prints the stack trace of the current call path.
The developer can control what level gets printed by setting the environment variable: WEBEX_LOG_LEVEL
.
These variables can be set on the command line or in the .env
file:
WEBEX_LOG_LEVEL="debug" npm start
# .env file
WEBEX_LOG_LEVEL=debug
This package is maintained by Cisco Webex for Developers.
Pull requests welcome. Please see CONTRIBUTING.md for more details.
© 2016-2020 Cisco and/or its affiliates. All Rights Reserved.