Skip to content

Commit

Permalink
Cleanup logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Petroshenko committed Jun 22, 2017
1 parent 651f6dc commit 9d085f0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions OAuth2.agent.lib.nut
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class OAuth2.JWTProfile {
"message" : header + "." + body
};

_log("Calling lambda:" + signrequest);
_log("Calling lambda...");
_signer.invoke({
"payload" : signrequest,
"functionName" : "RSALambda"
Expand Down Expand Up @@ -280,13 +280,13 @@ class OAuth2.JWTProfile {
// Records non-error event
function _log(message) {
if (_debug) {
server.log("[OAuth2JWTProfile]" + message);
server.log("[OAuth2JWTProfile] " + message);
}
}

// Records error event
function _error(message) {
server.error("[OAuth2JWTProfile]" + message);
server.error("[OAuth2JWTProfile] " + message);
}

}
Expand Down Expand Up @@ -811,12 +811,14 @@ class OAuth2.DeviceFlow {

// Records error event
function _error(txt) {
server.error(txt);
server.error("[OAuth2DeviceFlow] " + txt);
}

// Records non-error event
function _log(txt) {
if (_debug) server.log(txt);
if (_debug) {
server.log("[OAuth2DeviceFlow] " + txt);
}
}
} // end of Client
}

0 comments on commit 9d085f0

Please sign in to comment.