Logs further improved
This commit is contained in:
1 parent
6112f20b46
commit
1161832511
3 files changed
+5
-5
No files matched your search
Binary file not shown.
+2
-2
@@ -98,7 +98,7 @@
|
||||
function onResponse(err, pExchangePositions) {
|
||||
|
||||
if (FULL_LOG === true) { logger.write("[INFO] getPositionsAtExchange -> onResponse -> Entering function."); }
|
||||
if (FULL_LOG === true) { logger.write("[INFO] getPositionsAtExchange -> onResponse -> pExchangePositions = " + pExchangePositions); }
|
||||
if (FULL_LOG === true) { logger.write("[INFO] getPositionsAtExchange -> onResponse -> pExchangePositions = " + JSON.stringify(pExchangePositions)); }
|
||||
|
||||
switch (err.result) {
|
||||
case global.DEFAULT_OK_RESPONSE.result: { // Everything went well, we have the information requested.
|
||||
@@ -506,7 +506,7 @@
|
||||
|
||||
try {
|
||||
if (FULL_LOG === true) { logger.write("[INFO] movePositionAtExchange -> Entering function."); }
|
||||
if (FULL_LOG === true) { logger.write("[INFO] movePositionAtExchange -> pPosition = " + pPosition); }
|
||||
if (FULL_LOG === true) { logger.write("[INFO] movePositionAtExchange -> pPosition = " + JSON.stringify(pPosition)); }
|
||||
if (FULL_LOG === true) { logger.write("[INFO] movePositionAtExchange -> pNewRate = " + pNewRate); }
|
||||
|
||||
exchangeAPI.movePosition(pPosition, pNewRate, onResponse);
|
||||
|
||||
@@ -292,20 +292,20 @@
|
||||
|
||||
switch (err.result) {
|
||||
case global.DEFAULT_OK_RESPONSE.result: {
|
||||
logger.write("[INFO] run -> loop -> startUserBot -> onFinished > Execution finished well. :-)");
|
||||
logger.write("[INFO] run -> loop -> saveContext -> onFinished > Execution finished well. :-)");
|
||||
nextWaitTime = 'Normal';
|
||||
loopControl(nextWaitTime);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case global.DEFAULT_RETRY_RESPONSE.result: { // Something bad happened, but if we retry in a while it might go through the next time.
|
||||
logger.write("[ERROR] run -> loop -> startUserBot -> onFinished > Can not retry at this point.");
|
||||
logger.write("[ERROR] run -> loop -> saveContext -> onFinished > Can not retry at this point.");
|
||||
callBackFunction(global.DEFAULT_FAIL_RESPONSE);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case global.DEFAULT_FAIL_RESPONSE.result: { // This is an unexpected exception that we do not know how to handle.
|
||||
logger.write("[ERROR] run -> loop -> startUserBot -> onFinished > Operation Failed. Aborting the process.");
|
||||
logger.write("[ERROR] run -> loop -> saveContext -> onFinished > Operation Failed. Aborting the process.");
|
||||
callBackFunction(err);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user