Skip to content

Commit

Permalink
switched to console.log and console.error exclusively
Browse files Browse the repository at this point in the history
  • Loading branch information
ObjectIsAdvantag committed Apr 3, 2018
1 parent 295c223 commit 9b12411
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions jsxapi/2-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

// Check args
if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
console.info("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.info("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
console.log("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.log("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
process.exit(1);
}
// Empty passwords are supported
Expand Down
6 changes: 3 additions & 3 deletions jsxapi/3-dial.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const jsxapi = require('jsxapi');

// Check args
if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
console.info("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.info("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
console.log("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.log("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
process.exit(1);
}

// Empty passwords are supported
const password = process.env.JSXAPI_PASSWORD ? process.env.JSXAPI_PASSWORD : "";

// Connect to the device
console.debug("connecting to your device...");
console.log("connecting to your device...");
const xapi = jsxapi.connect(process.env.JSXAPI_DEVICE_URL, {
username: process.env.JSXAPI_USERNAME,
password: password
Expand Down
2 changes: 1 addition & 1 deletion jsxapi/4-custom-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
const password = process.env.JSXAPI_PASSWORD ? process.env.JSXAPI_PASSWORD : "";

// Connect to the device
console.debug("connecting to your device...");
console.log("connecting to your device...");
const xapi = jsxapi.connect(process.env.JSXAPI_DEVICE_URL, {
username: process.env.JSXAPI_USERNAME,
password: password
Expand Down
6 changes: 3 additions & 3 deletions jsxapi/5-rolling-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const jsxapi = require('jsxapi');

// Check args
if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
console.info("Please specify info to connect to your device as JSXAPI_DEVICE_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.info("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
console.log("Please specify info to connect to your device as JSXAPI_DEVICE_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.log("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
process.exit(1);
}

Expand All @@ -44,7 +44,7 @@ function update(value) {
// Update Awake message
xapi.config.set('UserInterface CustomMessage', value)
.then(() => {
console.info('updated Awake message')
console.log('updated Awake message')
})
.catch((err) => {
console.error(`could not update Awake message : ${err.message}`)
Expand Down
8 changes: 4 additions & 4 deletions jsxapi/6-branding-logo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ const jsxapi = require('jsxapi');

// Check args
if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
console.info("Please specify info to connect to your device as JSXAPI_DEVICE_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.info("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
console.log("Please specify info to connect to your device as JSXAPI_DEVICE_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.log("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
process.exit(1);
}

// Empty passwords are supported
const password = process.env.JSXAPI_PASSWORD ? process.env.JSXAPI_PASSWORD : "";

// Connect to the device
console.debug("connecting to your device...");
console.log("connecting to your device...");
const xapi = jsxapi.connect(process.env.JSXAPI_DEVICE_URL, {
username: process.env.JSXAPI_USERNAME,
password: password
Expand Down Expand Up @@ -58,7 +58,7 @@ xapi.on('ready', () => {
body: encoded
})
.then(() => {
console.info('updated Branding logo in Halfwake mode');
console.log('updated Branding logo in Halfwake mode');

// Switch to Halwake mode
xapi.command('Standby Halfwake')
Expand Down
6 changes: 3 additions & 3 deletions jsxapi/7-feedback-peoplecount.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ const jsxapi = require('jsxapi');

// Check args
if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
console.info("Please specify info to connect to your device as JSXAPI_DEVICE_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.info("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
console.log("Please specify info to connect to your device as JSXAPI_DEVICE_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.log("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
process.exit(1);
}

// Empty passwords are supported
const password = process.env.JSXAPI_PASSWORD ? process.env.JSXAPI_PASSWORD : "";

// Connect to the device
console.debug("connecting to your device...");
console.log("connecting to your device...");
const xapi = jsxapi.connect(process.env.JSXAPI_DEVICE_URL, {
username: process.env.JSXAPI_USERNAME,
password: password
Expand Down
6 changes: 3 additions & 3 deletions jsxapi/8-listen-audio-volume.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const jsxapi = require('jsxapi');

// Check args
if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
console.info("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.info("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
console.log("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.log("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
process.exit(1);
}

// Empty passwords are supported
const password = process.env.JSXAPI_PASSWORD ? process.env.JSXAPI_PASSWORD : "";

// Connect to the device
console.debug("connecting to your device...");
console.log("connecting to your device...");
const xapi = jsxapi.connect(process.env.JSXAPI_DEVICE_URL, {
username: process.env.JSXAPI_USERNAME,
password: password
Expand Down
6 changes: 3 additions & 3 deletions jsxapi/9-listen-all-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ const jsxapi = require('jsxapi');

// Check args
if (!process.env.JSXAPI_DEVICE_URL || !process.env.JSXAPI_USERNAME) {
console.info("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.info("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
console.log("Please specify info to connect to your device as JSXAPI_URL, JSXAPI_USERNAME, JSXAPI_PASSWORD env variables");
console.log("Bash example: JSXAPI_DEVICE_URL='ssh://192.168.1.34' JSXAPI_USERNAME='integrator' JSXAPI_PASSWORD='integrator' node example.js");
process.exit(1);
}

// Empty passwords are supported
const password = process.env.JSXAPI_PASSWORD ? process.env.JSXAPI_PASSWORD : "";

// Connect to the device
console.debug("connecting to your device...");
console.log("connecting to your device...");
const xapi = jsxapi.connect(process.env.JSXAPI_DEVICE_URL, {
username: process.env.JSXAPI_USERNAME,
password: password
Expand Down
4 changes: 2 additions & 2 deletions jsxapi/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "tutorial",
"version": "0.2.0",
"version": "0.2.1",
"description": "Example Scripts using the Node.js jsxapi for Cisco Collaboration Devices",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Stève Sfartz <stsfartz@cisco.com>",
"license": "MIT",
"dependencies": {
"jsxapi": "^4.0.1"
"jsxapi": "^4.1.2"
}
}

0 comments on commit 9b12411

Please sign in to comment.