Created
July 25, 2014 03:43
-
-
Save garyjoy/2cef33fdd8407974d5d5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logError(component, error, context) { | |
var processId = ""; | |
var taskId = ""; | |
if (tw.system.currentProcessInstanceID != null) { | |
processId = tw.system.currentProcessInstanceID; | |
} | |
if (tw.system.currentTask != null) { | |
taskId = tw.system.currentTask.id; | |
} | |
var processApp = wrapInQuotes(getCurrentProcessApplication()); | |
component = wrapInQuotes(component); | |
context = wrapInQuotes(context); | |
processId = wrapInQuotes(processId); | |
taskId = wrapInQuotes(taskId); | |
error = wrapInQuotes(error); | |
log.error('app=' + processApp + ' logType="ERROR" component=' + component + ' context=' + context + ' instanceId=' + processId + ' taskId=' + taskId + ' error=' + error); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment