Comparing version 1.0.0-beta.13 to 1.0.0-beta.14
# Change Log | ||
## [1.0.0-beta.14] - 08-08-2017 | ||
### Changes | ||
- Changed verbose signature from `msg, level` to `level, msg` | ||
- Updated to use `requires_token` naming | ||
## [1.0.0-beta.13] - 03-08-2017 | ||
@@ -4,0 +9,0 @@ ### Update |
{ | ||
"name": "residue", | ||
"version": "1.0.0-beta.13", | ||
"version": "1.0.0-beta.14", | ||
"description": "Logging client for real-time centralized logging server.", | ||
@@ -5,0 +5,0 @@ "main": "src/residue.js", |
@@ -53,3 +53,4 @@ // | ||
app.get('/', function (req, res) { | ||
defaultLogger.info('using default logger'); | ||
defaultLogger.info('info default logger'); | ||
defaultLogger.verbose(3, 'verbose using default logger'); | ||
namedFunc(); | ||
@@ -56,0 +57,0 @@ res.send('Hello World!'); |
@@ -14,6 +14,7 @@ { | ||
"dispatch_delay": 1, | ||
"plain_request": true, | ||
"main_thread_id": "Main Thread", | ||
"server_public_key": "/Users/majid.khan/Projects/residue/samples/clients/netcat/server-1024-public.pem", | ||
"server_public_key": "/Users/mkhan/Projects/residue/tools/netcat-client/server-1024-public.pem", | ||
"client_id": "muflihun00102030", | ||
"client_private_key": "/Users/majid.khan/Projects/residue/samples/clients/netcat/client-256-private.pem" | ||
"client_private_key": "/Users/mkhan/Projects/residue/tools/netcat-client/client-256-private.pem" | ||
} |
@@ -91,3 +91,3 @@ // | ||
ALLOW_UNKNOWN_LOGGERS: 1, | ||
CHECK_TOKENS: 2, | ||
REQUIRES_TOKEN: 2, | ||
ALLOW_DEFAULT_ACCESS_CODE: 4, | ||
@@ -166,5 +166,2 @@ ALLOW_PLAIN_LOG_REQUEST: 8, | ||
} | ||
if (sendPlain) { | ||
request.client_id = Params.connection.client_id; | ||
} | ||
let finalRequest = JSON.stringify(request); | ||
@@ -320,3 +317,3 @@ if (compress) { | ||
Utils.vLog(8, `Token socket: ${Params.token_socket.address().port}`); | ||
if (Utils.hasFlag(Flag.CHECK_TOKENS)) { | ||
if (Utils.hasFlag(Flag.REQUIRES_TOKEN)) { | ||
Utils.debugLog('Obtaining tokens...'); | ||
@@ -362,5 +359,5 @@ Params.options.access_codes.forEach(function(item) { | ||
Utils.log('Remote connection closed!'); | ||
if (Params.connected) { | ||
Params.disconnected_by_remote = true; | ||
} | ||
if (Params.connected) { | ||
Params.disconnected_by_remote = true; | ||
} | ||
disconnect(); | ||
@@ -530,3 +527,3 @@ }); | ||
hasValidToken = function(loggerId) { | ||
if (!Utils.hasFlag(Flag.CHECK_TOKENS)) { | ||
if (!Utils.hasFlag(Flag.REQUIRES_TOKEN)) { | ||
return true; | ||
@@ -568,10 +565,10 @@ } | ||
}); | ||
const totalListener = Params.connection_socket.listenerCount('connect'); | ||
if (totalListener >= 1) { | ||
Utils.log('Checking for connection...' + totalListener); | ||
Params.connection_socket.emit('connect'); | ||
} else { | ||
Utils.log('Retrying to connect...'); | ||
connect(Params.options); | ||
} | ||
const totalListener = Params.connection_socket.listenerCount('connect'); | ||
if (totalListener >= 1) { | ||
Utils.log('Checking for connection...' + totalListener); | ||
Params.connection_socket.emit('connect'); | ||
} else { | ||
Utils.log('Retrying to connect...'); | ||
connect(Params.options); | ||
} | ||
} | ||
@@ -636,3 +633,3 @@ return; | ||
}; | ||
if (Utils.hasFlag(Flag.CHECK_TOKENS)) { | ||
if (Utils.hasFlag(Flag.REQUIRES_TOKEN)) { | ||
request.token = getToken(loggerId); | ||
@@ -643,2 +640,5 @@ } | ||
} | ||
if (Params.options.plain_request) { | ||
request.client_id = Params.connection.client_id; | ||
} | ||
Utils.sendRequest(request, Params.logging_socket, false, Params.options.plain_request && Utils.hasFlag(Flag.ALLOW_PLAIN_LOG_REQUEST), Utils.hasFlag(Flag.COMPRESSION)); | ||
@@ -835,3 +835,3 @@ } | ||
this.verbose = function(message, level) { | ||
this.verbose = function(level, message) { | ||
sendLogRequest(message, LoggingLevels.Verbose, this.id, getSourceFile(), getSourceLine(), getSourceFunc(), level); | ||
@@ -838,0 +838,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50671
908