0.2.7 change no host when port supplied warning, update to new logger location

tls
David Kebler 2019-02-14 14:01:14 -08:00
parent 609c2b51ca
commit b587d5f2f2
3 changed files with 6 additions and 9 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@uci/socket",
"version": "0.2.3",
"version": "0.2.7",
"description": "JSON packet intra(named)/inter(TCP) host communication over socket",
"main": "src",
"scripts": {
@ -48,10 +48,10 @@
"nodemon": "^1.18.6"
},
"dependencies": {
"@uci/logger": "0.0.9",
"@uci-utils/logger": "0.0.13",
"better-try-catch": "^0.6.2",
"clone": "^2.1.2",
"death": "^1.1.0",
"make-dir": "^1.3.0"
"make-dir": "^2.0.0"
}
}

View File

@ -4,7 +4,7 @@ import btc from 'better-try-catch'
import JsonStream from './json-stream'
// import logger from '../../uci-logger/src/logger'
import logger from '@uci/logger'
import logger from '@uci-utils/logger'
let log = {}
@ -34,10 +34,7 @@ class SocketConsumer extends Socket {
})
this.id = opts.id || opts.name || 'socket:' + new Date().getTime()
if (!opts.path) {
log.warn(
{ opts: opts },
'no host supplied using localhost...use named piped instead'
)
if(!opts.host) log.warn({ opts: opts, msg:'no host supplied using localhost...use named piped instead - opts.path'})
opts.host = opts.host || '127.0.0.1'
opts.port = opts.port || 8080
} else {

View File

@ -9,7 +9,7 @@ import _ON_DEATH from 'death' //this is intentionally ugly
import JSONStream from './json-stream'
import clone from 'clone'
// uci modules
import logger from '@uci/logger'
import logger from '@uci-utils/logger'
let log = {} // must declare here and set later for module wide access
export default function socketClass(Server) {