How to use writeEvent method in Mocha

Best JavaScript code snippet using mocha

RetailLogger.js

Source:RetailLogger.js Github

copy

Full Screen

...26 RetailLogger.writePageViewEvent = function (pageName) {27 TsLogging.LoggerBase.writePageViewEvent(pageName);28 };29 RetailLogger.genericError = function (message) {30 TsLogging.LoggerBase.writeEvent("GenericError", 40000, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "{0}");31 };32 RetailLogger.genericWarning = function (message) {33 TsLogging.LoggerBase.writeEvent("GenericWarning", 40001, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "{0}");34 };35 RetailLogger.genericInfo = function (message) {36 TsLogging.LoggerBase.writeEvent("GenericInfo", 40002, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "{0}");37 };38 RetailLogger.extendedCritical = function (message, parameter1, parameter2, parameter3, parameter4, parameter5, parmater6) {39 if (parameter1 === void 0) { parameter1 = ""; }40 if (parameter2 === void 0) { parameter2 = ""; }41 if (parameter3 === void 0) { parameter3 = ""; }42 if (parameter4 === void 0) { parameter4 = ""; }43 if (parameter5 === void 0) { parameter5 = ""; }44 if (parmater6 === void 0) { parmater6 = ""; }45 TsLogging.LoggerBase.writeEvent("ExtendedCritical", 40005, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Critical, [], "", "", "{0}");46 };47 RetailLogger.extendedError = function (message, parameter1, parameter2, parameter3, parameter4, parameter5, parmater6) {48 if (parameter1 === void 0) { parameter1 = ""; }49 if (parameter2 === void 0) { parameter2 = ""; }50 if (parameter3 === void 0) { parameter3 = ""; }51 if (parameter4 === void 0) { parameter4 = ""; }52 if (parameter5 === void 0) { parameter5 = ""; }53 if (parmater6 === void 0) { parmater6 = ""; }54 TsLogging.LoggerBase.writeEvent("ExtendedError", 40006, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "{0}");55 };56 RetailLogger.extendedWarning = function (message, parameter1, parameter2, parameter3, parameter4, parameter5, parmater6) {57 if (parameter1 === void 0) { parameter1 = ""; }58 if (parameter2 === void 0) { parameter2 = ""; }59 if (parameter3 === void 0) { parameter3 = ""; }60 if (parameter4 === void 0) { parameter4 = ""; }61 if (parameter5 === void 0) { parameter5 = ""; }62 if (parmater6 === void 0) { parmater6 = ""; }63 TsLogging.LoggerBase.writeEvent("ExtendedWarning", 40007, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "{0}");64 };65 RetailLogger.extendedInformational = function (message, parameter1, parameter2, parameter3, parameter4, parameter5, parmater6) {66 if (parameter1 === void 0) { parameter1 = ""; }67 if (parameter2 === void 0) { parameter2 = ""; }68 if (parameter3 === void 0) { parameter3 = ""; }69 if (parameter4 === void 0) { parameter4 = ""; }70 if (parameter5 === void 0) { parameter5 = ""; }71 if (parmater6 === void 0) { parmater6 = ""; }72 TsLogging.LoggerBase.writeEvent("ExtendedInformational", 40008, 1, TsLogging.EventChannel.Admin, TsLogging.EventLevel.Informational, [], "", "", "{0}");73 };74 RetailLogger.extendedVerbose = function (message, parameter1, parameter2, parameter3, parameter4, parameter5, parmater6) {75 if (parameter1 === void 0) { parameter1 = ""; }76 if (parameter2 === void 0) { parameter2 = ""; }77 if (parameter3 === void 0) { parameter3 = ""; }78 if (parameter4 === void 0) { parameter4 = ""; }79 if (parameter5 === void 0) { parameter5 = ""; }80 if (parmater6 === void 0) { parmater6 = ""; }81 TsLogging.LoggerBase.writeEvent("ExtendedVerbose", 40009, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "{0}");82 };83 RetailLogger.appLaunch = function (appSessionId, isDemoMode, deviceId, deviceNumber, applicationType, locatorServiceUrl, aadLoginUrl, aadClientId) {84 TsLogging.LoggerBase.writeEvent("AppLaunch", 40010, 1, TsLogging.EventChannel.Analytic, TsLogging.EventLevel.LogAlways, [], "", "", "The application has been launched.");85 };86 RetailLogger.appUnhandledError = function (errorMessage, stackTrace, errorUrl, errorJson) {87 TsLogging.LoggerBase.writeEvent("AppUnhandledError", 40011, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Unhandled App error: {0}; \n StackTrace: {1}; ErrorUrl: '{2}'; ErrorObject: '{3}'");88 };89 RetailLogger.logon = function (userSessionId) {90 TsLogging.LoggerBase.writeEvent("Logon", 40012, 1, TsLogging.EventChannel.Analytic, TsLogging.EventLevel.LogAlways, [], "", "", "User logged in.");91 };92 RetailLogger.logoff = function (userSessionId) {93 TsLogging.LoggerBase.writeEvent("Logoff", 40013, 1, TsLogging.EventChannel.Analytic, TsLogging.EventLevel.LogAlways, [], "", "", "User logged out.");94 };95 RetailLogger.userMessageDisplay = function (messageType, messageTitle, message) {96 TsLogging.LoggerBase.writeEvent("UserMessageDisplay", 40020, 1, TsLogging.EventChannel.Admin, TsLogging.EventLevel.Informational, [], "", "", "Message displayed to the user: title: '{1}'.");97 };98 RetailLogger.errorMessageDisplay = function (errorCode, errorMessage) {99 TsLogging.LoggerBase.writeEvent("ErrorMessageDisplay", 40021, 1, TsLogging.EventChannel.Admin, TsLogging.EventLevel.Error, [], "", "", "Error displayed to the user: error message '{1}'.");100 };101 RetailLogger.applicationContextSetupLanguagesInvalidLanguage = function (languageId) {102 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupLanguagesInvalidLanguage", 40050, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "ApplicationContext SetupLanguages Invalid language ID = '{0}'.");103 };104 RetailLogger.applicationStylesheetsLoadFailed = function (uri, errorCode, errorMessage) {105 TsLogging.LoggerBase.writeEvent("ApplicationStylesheetsLoadFailed", 40051, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Application stylesheet has failed to load: uri = '{0}', error message '{2}'.");106 };107 RetailLogger.applicationLocalStorageNotAvailable = function (errorMessage) {108 TsLogging.LoggerBase.writeEvent("ApplicationLocalStorageNotAvailable", 40052, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Application Local storage is not available: error message '{0}'.");109 };110 RetailLogger.applicationContextInvalidCatalogImageFormat = function () {111 TsLogging.LoggerBase.writeEvent("ApplicationContextInvalidCatalogImageFormat", 40053, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Invalid Catalog image format.");112 };113 RetailLogger.applicationContextApplicationContextEntitySetInvalid = function (entitySetId) {114 TsLogging.LoggerBase.writeEvent("ApplicationContextApplicationContextEntitySetInvalid", 40054, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "A method with ApplicationContextEntitySet ID '{0}' was reported.");115 };116 RetailLogger.applicationContextApplicationContextEntitySetMultipleTimes = function (entitySetId) {117 TsLogging.LoggerBase.writeEvent("ApplicationContextApplicationContextEntitySetMultipleTimes", 40055, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "A method with ApplicationContextEntitySet ID '{0}' was reported multiple times.");118 };119 RetailLogger.applicationContextApplicationContextEntitySetNoMethodNumber = function () {120 TsLogging.LoggerBase.writeEvent("ApplicationContextApplicationContextEntitySetNoMethodNumber", 40056, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The value ApplicationContextEntitySet.All does not represent the number of methods that can be run");121 };122 RetailLogger.applicationFailedToParseError = function (error) {123 TsLogging.LoggerBase.writeEvent("ApplicationFailedToParseError", 40057, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Failed parse error message, error = '{0}'.");124 };125 RetailLogger.applicationFailedToParseErrorInvalidJson = function (error) {126 TsLogging.LoggerBase.writeEvent("ApplicationFailedToParseErrorInvalidJson", 40058, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Invalid JSON format from server, it was not possible to parse error message, error = '{0}'.");127 };128 RetailLogger.applicationGlobalizationResourcesEmpty = function () {129 TsLogging.LoggerBase.writeEvent("ApplicationGlobalizationResourcesEmpty", 40059, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Application Globalization Resources are empty.");130 };131 RetailLogger.applicationGlobalizationResourcesLoadFailed = function (languageTag, errorCode, errorMessage) {132 TsLogging.LoggerBase.writeEvent("ApplicationGlobalizationResourcesLoadFailed", 40060, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Application WebGlobalization Can not load resources for the '{0}' culture: error message = '{2}'.");133 };134 RetailLogger.applicationContextLoadCategoriesFailed = function (errorCode, errorMessage) {135 TsLogging.LoggerBase.writeEvent("ApplicationContextLoadCategoriesFailed", 40061, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Application Load categories failed: error message = '{1}'.");136 };137 RetailLogger.applicationLoadChannelConfigurationFailed = function (component, errorCode, errorMessage) {138 TsLogging.LoggerBase.writeEvent("ApplicationLoadChannelConfigurationFailed", 40062, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Application Load channel configuration failed: component = '{0}', error message = '{2}'.");139 };140 RetailLogger.applicationContextSetupDebitCashbackLimitFailed = function (errorCode, errorMessage) {141 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupDebitCashbackLimitFailed", 40063, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting debit cashback limit: error message = '{1}'.");142 };143 RetailLogger.applicationContextSetupCardTypesFailed = function (errorCode, errorMessage) {144 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupCardTypesFailed", 40064, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of card types: error message = '{1}'.");145 };146 RetailLogger.applicationContextSetupReturnOrderReasonCodesFailed = function (errorCode, errorMessage) {147 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupReturnOrderReasonCodesFailed", 40065, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of return order reason codes: error message = '{1}'.");148 };149 RetailLogger.applicationContextSetupCustomerTypesFailed = function (errorCode, errorMessage) {150 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupCustomerTypesFailed", 40066, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of customer types: error message = '{1}'.");151 };152 RetailLogger.applicationContextSetupCustomerGroupsFailed = function (errorCode, errorMessage) {153 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupCustomerGroupsFailed", 40067, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of customer groups: error message = '{1}'.");154 };155 RetailLogger.applicationContextSetupHardwareStationProfileFailed = function (errorCode, errorMessage) {156 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupHardwareStationProfileFailed", 40068, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of hardware station profiles: error message = '{1}'.");157 };158 RetailLogger.applicationContextSetupLanguagesFailed = function (errorCode, errorMessage) {159 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupLanguagesFailed", 40069, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of available languages: error message = '{1}'.");160 };161 RetailLogger.applicationContextSetupReceiptOptionsFailed = function (errorCode, errorMessage) {162 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupReceiptOptionsFailed", 40070, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of receipt options: error message = '{1}'.");163 };164 RetailLogger.applicationContextSetupCashDeclarationsFailed = function (errorCode, errorMessage) {165 TsLogging.LoggerBase.writeEvent("ApplicationContextSetupCashDeclarationsFailed", 40071, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ApplicationContext Error when getting list of cash declarations: error message = '{1}'.");166 };167 RetailLogger.applicationGlobalizationResourcesLoading = function (languageTag) {168 TsLogging.LoggerBase.writeEvent("applicationGlobalizationResourcesLoading", 40072, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "Application WebGlobalization loadResourcesAsync Loading string resources for the language tag '{0}'.");169 };170 RetailLogger.applicationGlobalizationResourcesLanguageResolved = function (languageTag) {171 TsLogging.LoggerBase.writeEvent("applicationGlobalizationResourcesLanguageResolved", 40073, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "Application WebGlobalization loadResourcesAsync Requested language tag has been resolved to '{0}'.");172 };173 RetailLogger.applicationLoadEnvironmentConfigurationStorageLoadSucceeded = function (config) {174 TsLogging.LoggerBase.writeEvent("applicationLoadEnvironmentConfigurationStorageLoadSucceeded", 40074, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The environment configuration was successfully loaded from the local storage and set on the app. Config: '{0}'.");175 };176 RetailLogger.applicationLoadEnvironmentConfigurationServerLoadSucceeded = function (config) {177 TsLogging.LoggerBase.writeEvent("applicationLoadEnvironmentConfigurationServerLoadSucceeded", 40075, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The environment configuration was successfully loaded from the server and set on the app. Config: '{0}'.");178 };179 RetailLogger.applicationLoadEnvironmentConfigurationServerLoadFailed = function (errorMessage) {180 TsLogging.LoggerBase.writeEvent("applicationLoadEnvironmentConfigurationServerLoadFailed", 40076, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "There was an error loading the environment configuration from the server. Error: '{0}'.");181 };182 RetailLogger.applicationUpdateIsRequired = function () {183 TsLogging.LoggerBase.writeEvent("applicationUpdateIsRequired", 40077, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Application update is required.");184 };185 RetailLogger.accessWrongDeviceTerminal = function () {186 TsLogging.LoggerBase.writeEvent("accessWrongDeviceTerminal", 40078, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Access to the wrong device/terminal while the different one is being currently activated.");187 };188 RetailLogger.modelManagersRetailServerRequestStarted = function (requestId, requestUrl) {189 TsLogging.LoggerBase.writeEvent("ModelManagersRetailServerRequestStarted", 40100, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "The Retail Server Request with request id '{0}' and request url '{1}' started.");190 };191 RetailLogger.modelManagersRetailServerRequestError = function (requestId, requestUrl, error) {192 TsLogging.LoggerBase.writeEvent("ModelManagersRetailServerRequestError", 40101, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The Retail Server Request with request id '{0}' and request url '{1}' failed. Error: {2}.");193 };194 RetailLogger.modelManagersRetailServerRequestFinished = function (requestId, requestUrl) {195 TsLogging.LoggerBase.writeEvent("ModelManagersRetailServerRequestFinished", 40102, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "The Retail Server Request with request id '{0}' and request url '{1}' succeeded.");196 };197 RetailLogger.modelManagersCommerceRuntimeRequestStarted = function (requestId, requestUrl) {198 TsLogging.LoggerBase.writeEvent("ModelManagersCommerceRuntimeRequestStarted", 40103, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Commerce Runtime Request with request id '{0}' and request url '{1}' started.");199 };200 RetailLogger.modelManagersCommerceRuntimeRequestError = function (requestId, requestUrl, error) {201 TsLogging.LoggerBase.writeEvent("ModelManagersCommerceRuntimeRequestError", 40104, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The Commerce Runtime Request with request id '{0}' and request url '{1}' failed. Error: {2}.");202 };203 RetailLogger.modelManagersCommerceRuntimeRequestFinished = function (requestId, requestUrl) {204 TsLogging.LoggerBase.writeEvent("ModelManagersCommerceRuntimeRequestFinished", 40105, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Commerce Runtime Request with request id '{0}' and request url '{1}' succeeded.");205 };206 RetailLogger.modelManagersCheckDownloadCompleteRequestError = function (statusText) {207 TsLogging.LoggerBase.writeEvent("ModelManagersCheckDownloadCompleteRequestError", 40106, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The request to check if offline data is downloaded to offline database failed with error: {0}.");208 };209 RetailLogger.modelManagersLocatorServiceRequestStarted = function (request, locatorServiceActivityId) {210 TsLogging.LoggerBase.writeEvent("modelManagersLocatorServiceRequestStarted", 40107, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The request to discover retail server url has started. Request: {0}, Locator service activity id: {2}.");211 };212 RetailLogger.modelManagersLocatorServiceRequestException = function (errorMessage, locatorServiceActivityId) {213 TsLogging.LoggerBase.writeEvent("modelManagersLocatorServiceRequestException", 40108, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The request to discover retail server url has failed. Error: {0}. Locator service activity id: {1}.");214 };215 RetailLogger.modelManagersLocatorServiceRequestFinished = function (locatorServiceActivityId) {216 TsLogging.LoggerBase.writeEvent("modelManagersLocatorServiceRequestFinished", 40109, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The request to discover retail server url has finished. Locator service activity id: {0}.");217 };218 RetailLogger.modelManagersServerResponseStatusCode = function (statusCode) {219 TsLogging.LoggerBase.writeEvent("modelManagersServerResponseStatusCode", 40110, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Server response status code is '{0}'.");220 };221 RetailLogger.modelManagersChainedRequestFactorySwitchingToOnline = function () {222 TsLogging.LoggerBase.writeEvent("modelManagersChainedRequestFactorySwitchingToOnline", 40111, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "ChannelRequestFactory Switching connection state to online.");223 };224 RetailLogger.modelManagersChainedRequestFactorySwitchingToOffline = function () {225 TsLogging.LoggerBase.writeEvent("modelManagersChainedRequestFactorySwitchingToOffline", 40112, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "ChannelRequestFactory Switching connection state to offline.");226 };227 RetailLogger.modelManagersChainedRequestFactoryShiftTransferFailed = function (currentState, errorCode, errorMessage) {228 TsLogging.LoggerBase.writeEvent("modelManagersChainedRequestFactoryShiftTransferFailed", 40113, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ChannelRequestFactory Shift transfer failed during connection switch, current state = '{0}', error message = '{2}'.");229 };230 RetailLogger.modelManagersChainedRequestFactoryCartTransferToOfflineFailed = function (errorCode, errorMessage) {231 TsLogging.LoggerBase.writeEvent("modelManagersChainedRequestFactoryCartTransferToOfflineFailed", 40114, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ChannelRequestFactory Cart transfer to offline failed, error message = '{1}'.");232 };233 RetailLogger.modelManagersODataExecuteBatchSuccess = function (batchRequestUri) {234 TsLogging.LoggerBase.writeEvent("modelManagersODataExecuteBatchSuccess", 40115, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "ODataRequest Request '{0}' success.");235 };236 RetailLogger.modelManagersODataExecuteBatchFailed = function (batchRequestUri, errorCode, errorMessage) {237 TsLogging.LoggerBase.writeEvent("modelManagersODataExecuteBatchFailed", 40116, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ODataRequest Request '{0}' failed, error message = '{2}'.");238 };239 RetailLogger.modelManagersRetailServerManagerFactoryCreate = function (platform) {240 TsLogging.LoggerBase.writeEvent("modelManagersRetailServerManagerFactoryCreate", 40117, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "Creating Data Service Request Factory for '{0}' platform.");241 };242 RetailLogger.modelManagersRetailServerManagerFactoryCreateChained = function () {243 TsLogging.LoggerBase.writeEvent("modelManagersRetailServerManagerFactoryCreateChained", 40118, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "RetailServerManagerFactory Creating chained data service factory.");244 };245 RetailLogger.modelManagersRetailServerManagerFactoryCreateOnline = function () {246 TsLogging.LoggerBase.writeEvent("modelManagersRetailServerManagerFactoryCreateOnline", 40119, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "RetailServerManagerFactory Creating online data service factory.");247 };248 RetailLogger.modelManagersCartManagerAddTenderLineToCartFailed = function (errorCode, errorMessage) {249 TsLogging.LoggerBase.writeEvent("modelManagersCartManagerAddTenderLineToCartFailed", 40120, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Add tender line to cart failed, recovering: failed, error message = '{1}'.");250 };251 RetailLogger.modelManagersCartManagerFailedToOverridePriceNoCartLinesProvided = function () {252 TsLogging.LoggerBase.writeEvent("modelManagersCartManagerFailedToOverridePriceNoCartLinesProvided", 40121, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CartManager Attempted to override price when no cart lines were provided.");253 };254 RetailLogger.modelManagersCartManagerFailedToOverridePriceNoCartLineOrPriceProvided = function () {255 TsLogging.LoggerBase.writeEvent("modelManagersCartManagerFailedToOverridePriceNoCartLineOrPriceProvided", 40122, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CartManager Attempted to override price when a cart line, cart line id, or price was not provided.");256 };257 RetailLogger.modelManagersCustomerManagerCustomerValidationFailed = function () {258 TsLogging.LoggerBase.writeEvent("modelManagersCustomerManagerCustomerValidationFailed", 40123, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CustomerManager Update customer validation failed.");259 };260 RetailLogger.modelManagersCustomerManagerCustomerIsNull = function () {261 TsLogging.LoggerBase.writeEvent("modelManagersCustomerManagerCustomerIsNull", 40124, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CustomerManager Customer id is null, empty or undefined.");262 };263 RetailLogger.modelManagersRetailServerOdataRequestResponse = function (clientRequest, serverResponse) {264 TsLogging.LoggerBase.writeEvent("modelManagersRetailServerOdataRequestResponse", 40125, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Call to Retail Server succeeded.\n\nRequest:\n'{0}'\n\nResponse:\n'{1}'");265 };266 RetailLogger.modelManagersRetailServerOdataRequestErrorResponse = function (clientRequest, serverResponse) {267 TsLogging.LoggerBase.writeEvent("modelManagersRetailServerOdataRequestErrorResponse", 40126, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Call to Retail Server failed.\n\nRequest:\n'{0}'\n\nResponse:\n'{1}'");268 };269 RetailLogger.modelManagersChainedRequestFactoryShiftTransferToOnlineCreateFailed = function (errorCode, errorMessage) {270 TsLogging.LoggerBase.writeEvent("modelManagersChainedRequestFactoryShiftTransferToOnlineCreateFailed", 40127, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ChannelRequestFactory Shift transfer from offline to online failed when creating or updating shift in online channel, error message = '{1}'.");271 };272 RetailLogger.modelManagersChainedRequestFactoryShiftTransferToOnlineDeleteFailed = function (errorCode, errorMessage) {273 TsLogging.LoggerBase.writeEvent("modelManagersChainedRequestFactoryShiftTransferToOnlineDeleteFailed", 40128, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ChannelRequestFactory Shift transfer from offline to online failed when deleting shift in offline channel, error message = '{1}'.");274 };275 RetailLogger.coreCannotMapResourceMessage = function (resourceId) {276 TsLogging.LoggerBase.writeEvent("ResourceStringMappingNotFound", 40200, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Cannot localize message from resource identifier: '{0}'.");277 };278 RetailLogger.coreCannotMapErrorCode = function (errorCode) {279 TsLogging.LoggerBase.writeEvent("ErrorCodeMappingNotFound", 40201, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Cannot map to error entity from error code: '{0}'.");280 };281 RetailLogger.corePropertyMissingInDeviceActivationSequence = function (propertyName, operationName) {282 TsLogging.LoggerBase.writeEvent("MissingPropertyOnActivationSequence", 40202, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Operation '{1}' on device activation sequence is missing property '{0}'.");283 };284 RetailLogger.coreRetailOperationStarted = function (correlationId, operationName, operationId) {285 TsLogging.LoggerBase.writeEvent("RetailOperationStarted", 40203, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Running operation {1} ({2}).");286 };287 RetailLogger.coreOperationManagerRevertToSelf = function () {288 TsLogging.LoggerBase.writeEvent("OperationManagerRevertToSelf", 40204, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Executing revert to self.");289 };290 RetailLogger.coreRetailOperationManagerOverride = function (operationName, operationId) {291 TsLogging.LoggerBase.writeEvent("RetailOperationManagerOverride", 40205, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Running manager override for operation {0} ({1}).");292 };293 RetailLogger.coreRetailOperationHandlerNotFound = function (operationName, operationId) {294 TsLogging.LoggerBase.writeEvent("RetailOperationHandlerNotFound", 40206, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Operation handler not found for operation {0} ({1}).");295 };296 RetailLogger.coreRetailOperationCompleted = function (correlationId, operationName, operationId) {297 TsLogging.LoggerBase.writeEvent("RetailOperationCompleted", 40207, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Operation execution completed for operation {1} ({2}).");298 };299 RetailLogger.coreRetailOperationCanceled = function (correlationId, operationName, operationId) {300 TsLogging.LoggerBase.writeEvent("RetailOperationCanceled", 40208, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Operation execution canceled for operation {1} ({2}).");301 };302 RetailLogger.coreRetailOperationFailed = function (correlationId, operationName, operationId, errorMessage) {303 TsLogging.LoggerBase.writeEvent("RetailOperationFailed", 40209, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Operation execution failed for operation {1} ({2}) with error: {3}.");304 };305 RetailLogger.coreTriggerExecutionStarted = function (triggerName) {306 TsLogging.LoggerBase.writeEvent("TriggerExecutionStarted", 40210, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Trigger execution started for trigger {0}.");307 };308 RetailLogger.coreTriggerExecutionCompleted = function (triggerName) {309 TsLogging.LoggerBase.writeEvent("TriggerExecutionCompleted", 40211, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Trigger execution completed for trigger {0}.");310 };311 RetailLogger.coreTriggerExecutionCanceled = function (triggerName) {312 TsLogging.LoggerBase.writeEvent("TriggerExecutionCanceled", 40212, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Trigger execution canceled for trigger {0}.");313 };314 RetailLogger.coreTriggerExecutionFailed = function (triggerName, errorMessage) {315 TsLogging.LoggerBase.writeEvent("TriggerExecutionFailed", 40213, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Trigger execution failed for trigger {0} with error: {1}.");316 };317 RetailLogger.coreLogOriginalUnauthorizedRetailServerResponse = function (errorResourceId, errorMessage) {318 TsLogging.LoggerBase.writeEvent("LogOriginalUnauthorizedRetailServerResponse", 40214, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Unauthorized response with error: {1}. ErrorResourceId: {0}");319 };320 RetailLogger.coreLogXmlHttpRequestError = function (requestUrl, message) {321 TsLogging.LoggerBase.writeEvent("coreLogXmlHttpRequestError", 40215, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Warning, [], "", "", "Response error when sending request to URL {0}, Error message: '{1}'");322 };323 RetailLogger.coreHelpersProductPropertiesGetTranslation = function (translationKey) {324 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesGetTranslation", 40216, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "ProductPropertiesHelper Getting translation value: {0}.");325 };326 RetailLogger.coreHelpersProductPropertiesPropertyNotExist = function (propertyName) {327 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesPropertyNotExist", 40217, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "ProductPropertiesHelper Property {0} is either not exists or not yet implemented.");328 };329 RetailLogger.coreHelpersProductPropertiesUnitOfMeasureNotExist = function (unitOfMeasureSymbol) {330 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesUnitOfMeasureNotExist", 40218, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "ProductPropertiesHelper GetUnitOfMeasures() The unit of measure object does not exist for the unit of measure '{0}'.");331 };332 RetailLogger.coreHelpersProductPropertiesVariantPropertyNotExist = function (propertyName) {333 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesVariantPropertyNotExist", 40219, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "ProductPropertiesHelper Property {0} is either not exists or not yet implemented.");334 };335 RetailLogger.coreHelpersProductPropertiesTranslationPropertyNotFound = function (translationKey) {336 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesTranslationPropertyNotFound", 40220, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "ProductPropertiesHelper Could not get translation property {0}.");337 };338 RetailLogger.coreHelpersProductPropertiesVariantNotFound = function (variantId, productId) {339 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesVariantNotFound", 40221, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ProductPropertiesHelper Failed to find Variant {0} from product record Id: {1}.");340 };341 RetailLogger.coreHelpersProductPropertiesInputParameterProductIsUndefined = function (propertyName) {342 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesInputParameterProductIsUndefined", 40222, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ProductPropertiesHelper - ProductPropertyFormatter: Input parameter product is undefined. Property name: {0}.");343 };344 RetailLogger.coreHelpersProductPropertiesInputParameterPropertyNameIsInvalid = function (itemId, propertyName) {345 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesInputParameterPropertyNameIsInvalid", 40223, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ProductPropertiesHelper ProductPropertyFormatter: Input parameter propertyName is invalid. Item Id: {0}, Property name: {1}.");346 };347 RetailLogger.coreHelpersProductPropertiesProductNotHaveVariant = function (productId, variantId) {348 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesProductNotHaveVariant", 40224, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ProductPropertiesHelper Product with Item Id {0} does not have the requested variant {1}.");349 };350 RetailLogger.coreHelpersProductPropertiesProductNotHaveProperty = function (productId, propertyName) {351 TsLogging.LoggerBase.writeEvent("coreHelpersProductPropertiesProductNotHaveProperty", 40225, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ProductPropertiesHelper ProductPropertyFormatter: Product with Item Id {0} does not have the requested property {1}.");352 };353 RetailLogger.coreHelpersUnrecognizedAddressComponent = function (addressComponent) {354 TsLogging.LoggerBase.writeEvent("coreHelpersUnrecognizedAddressComponent", 40226, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AddressHelper Unrecognized address component: {0}.");355 };356 RetailLogger.coreHelpersInvalidManualDiscountType = function (manualDiscountType) {357 TsLogging.LoggerBase.writeEvent("coreHelpersInvalidManualDiscountType", 40228, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "DiscountsHelper Invalid manual discount type: '{0}'.");358 };359 RetailLogger.coreHelpersInvalidCustomerDiscountType = function (customerDiscountType) {360 TsLogging.LoggerBase.writeEvent("coreHelpersInvalidCustomerDiscountType", 40229, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "DiscountsHelper Invalid customer discount type: '{0}'.");361 };362 RetailLogger.coreHelpersInvalidDiscountLineType = function (discountLineType) {363 TsLogging.LoggerBase.writeEvent("coreHelpersInvalidDiscountLineType", 40230, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "DiscountsHelper Invalid discount line type: '{0}'.");364 };365 RetailLogger.coreHelpersUnknownAddressType = function (addressType) {366 TsLogging.LoggerBase.writeEvent("coreHelpersUnknownAddressType", 40231, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "AddressTypeEnumHelper getDescription() Unknown address type '{0}'.");367 };368 RetailLogger.coreTenderTypeMapOperationHasNoTenderType = function (operationId) {369 TsLogging.LoggerBase.writeEvent("coreTenderTypeMapOperationHasNoTenderType", 40232, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "TenderTypeMap Operation id {0} has no tender type mapped to it.");370 };371 RetailLogger.coreTenderTypeMapMultipleTendersOfSameType = function () {372 TsLogging.LoggerBase.writeEvent("coreTenderTypeMapMultipleTendersOfSameType", 40233, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "TenderTypeMap Multiple tenders of same type.");373 };374 RetailLogger.coreBindingHandlersLoadImageFailed = function (src) {375 TsLogging.LoggerBase.writeEvent("coreBindingHandlersLoadImageFailed", 40234, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "BindingHandlers SetDefaultImage() Error loading image for '{0}'.");376 };377 RetailLogger.coreFormattersCartLineWrongInputParameters = function (propertyName, data) {378 TsLogging.LoggerBase.writeEvent("coreFormattersCartLineWrongInputParameters", 40235, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Formatters.CartLineProperty Wrong input paramters: {0} data: {1}.");379 };380 RetailLogger.coreTenderTypeMapTenderTypeNotFound = function (tenderTypeId) {381 TsLogging.LoggerBase.writeEvent("coreTenderTypeMapTenderTypeNotFound", 40236, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "TenderTypeMap did not locate tender type. Tender type does not exist or job was not run. TenderTypeId: {0}");382 };383 RetailLogger.coreApplicationStorageSetItemFailure = function (storageKey, errorMessage) {384 TsLogging.LoggerBase.writeEvent("coreApplicationStorageSetItemFailure", 40237, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The attempt to save key '{0}' in application storage failed. Error message: {1}");385 };386 RetailLogger.coreApplicationStorageSetItemFailureRecoveryUnsuccessful = function (storageKey, errorMessage) {387 TsLogging.LoggerBase.writeEvent("coreApplicationStorageSetItemFailureRecoveryUnsuccessful", 40238, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The attempt to recover from the application storage failure for key '{0}' was unsucessful. Error message: {1}.");388 };389 RetailLogger.coreLogUserAuthenticationRetailServerResponse = function (errorResourceId, errorMessage) {390 TsLogging.LoggerBase.writeEvent("coreLogUserAuthenticationRetailServerResponse", 40239, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Unauthorized response with error: {1}. ErrorResourceId: {0}");391 };392 RetailLogger.coreRetailCheckOpenDrawerStatusExecutionStart = function () {393 TsLogging.LoggerBase.writeEvent("coreRetailCheckOpenDrawerStatusStart", 40240, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Check Open Cash Drawer Status Execution Started.");394 };395 RetailLogger.coreRetailCheckOpenDrawerStatusExecutionCompleted = function () {396 TsLogging.LoggerBase.writeEvent("coreRetailCheckOpenDrawerStatusExecutionCompleted", 40241, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Check Open Cash Drawer Status Execution Completed.");397 };398 RetailLogger.coreRetailCheckOpenDrawerStatusExecutionFailed = function (errorCode, errorMessage) {399 TsLogging.LoggerBase.writeEvent("coreRetailCheckOpenDrawerStatusExecutionFailed", 40242, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Check Open Cash Drawer Status Execution Failed: error message = '{1}'.");400 };401 RetailLogger.operationLogOffComplete = function () {402 TsLogging.LoggerBase.writeEvent("operationLogOffComplete", 40300, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Logoff operation handler success.");403 };404 RetailLogger.operationLogOffFailed = function (errorCode, errorMessage) {405 TsLogging.LoggerBase.writeEvent("operationLogOffFailed", 40301, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Post logoff operation(s) failed: error message = '{1}'.");406 };407 RetailLogger.operationAddGiftCard = function (giftCardId, amount, currency, lineDescription) {408 TsLogging.LoggerBase.writeEvent("operationAddGiftCard", 40302, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "AddGiftCard Gift card Id: {0}, amount: {1}, currency: {2}, description: {3}.");409 };410 RetailLogger.operationIssueGiftCard = function (giftCardId, amount, currency, lineDescription) {411 TsLogging.LoggerBase.writeEvent("operationIssueGiftCard", 40303, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "IssueGiftCard Gift card Id: {0}, amount: {1}, currency: {2}, description: {3}.");412 };413 RetailLogger.operationCloseShift = function () {414 TsLogging.LoggerBase.writeEvent("operationCloseShift", 40304, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "CloseShift Close shift operation succeeded.");415 };416 RetailLogger.operationLocateServerUrl = function (url) {417 TsLogging.LoggerBase.writeEvent("operationLocateServerUrl", 40305, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "UpdateServerUrl Getting Retail Server URL from locator service '{0}'.");418 };419 RetailLogger.operationUpdateServerUrl = function (url) {420 TsLogging.LoggerBase.writeEvent("operationUpdateServerUrl", 40306, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "UpdateServerUrl Retail Server URL from locator service '{0}'.");421 };422 RetailLogger.operationDeviceActivationUnhandledError = function (error) {423 TsLogging.LoggerBase.writeEvent("operationDeviceActivationUnhandledError", 40307, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "DeviceActivationOperation Unhandled error = '{0}'.");424 };425 RetailLogger.operationTimeClockNotEnabled = function () {426 TsLogging.LoggerBase.writeEvent("operationTimeClockNotEnabled", 40308, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "TimeClock Time clock not enabled.");427 };428 RetailLogger.operationPickingAndReceivingGetAllOrdersFailed = function () {429 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingGetAllOrdersFailed", 40309, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to get all purchase orders.");430 };431 RetailLogger.operationPickingAndReceivingUpdatePurchaseOrderFailed = function (orderId) {432 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingUpdatePurchaseOrderFailed", 40310, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to update purchase order {0}.");433 };434 RetailLogger.operationPickingAndReceivingCommitPurchaseOrderFailed = function (journalId) {435 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingCommitPurchaseOrderFailed", 40311, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to commit purchase order {0}.");436 };437 RetailLogger.operationPickingAndReceivingGetPurchaseOrderFailed = function (journalId) {438 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingGetPurchaseOrderFailed", 40312, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to get purchase order {0}.");439 };440 RetailLogger.operationPickingAndReceivingUpdateTransderOrderFailed = function (orderId) {441 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingUpdateTransderOrderFailed", 40313, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to update transfer order {0}.");442 };443 RetailLogger.operationPickingAndReceivingCommitTransferOrderFailed = function (journalId) {444 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingCommitTransferOrderFailed", 40314, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to commit transfer order {0}.");445 };446 RetailLogger.operationPickingAndReceivingGetTransferOrderFailed = function (journalId) {447 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingGetTransferOrderFailed", 40315, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to get transfer order {0}.");448 };449 RetailLogger.operationPickingAndReceivingUpdatePickingListFailed = function (orderId) {450 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingUpdatePickingListFailed", 40316, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to update picking list {0}.");451 };452 RetailLogger.operationPickingAndReceivingCommitPickingListFailed = function (journalId) {453 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingCommitPickingListFailed", 40317, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to commit picking list {0}.");454 };455 RetailLogger.operationPickingAndReceivingGetPickingListFailed = function (journalId) {456 TsLogging.LoggerBase.writeEvent("operationPickingAndReceivingGetPickingListFailed", 40318, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingOperationHandler Failed to get picking list {0}.");457 };458 RetailLogger.retailServerRequestRedirection = function (redirectionUrl) {459 TsLogging.LoggerBase.writeEvent("retailServerRequestRedirection", 40319, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Redirection response from server. Redirecting to: {0}.");460 };461 RetailLogger.operationItemSaleCreateCartLinesStarted = function (correlationId) {462 TsLogging.LoggerBase.writeEvent("operationItemSaleCreateCartLinesStarted", 40320, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Creating cart lines started.");463 };464 RetailLogger.operationItemSaleCreateCartLinesFinished = function (correlationId, successful) {465 TsLogging.LoggerBase.writeEvent("operationItemSaleCreateCartLinesFinished", 40321, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Creating cart lines " + successful ? "finished successfully." : "failed.");466 };467 RetailLogger.operationItemSaleGetProductSaleDetailsStarted = function (correlationId) {468 TsLogging.LoggerBase.writeEvent("operationItemSaleGetProductSaleDetailsStarted", 40322, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Retrieving product details started.");469 };470 RetailLogger.operationItemSaleGetProductSaleDetailsFinished = function (correlationId, successful) {471 TsLogging.LoggerBase.writeEvent("operationItemSaleGetProductSaleDetailsFinished", 40323, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Retrieving product details " + successful ? "finished successfully." : "failed.");472 };473 RetailLogger.operationBlindCloseSharedShiftFailedOnRevertToSelfDuringCancellation = function (shiftId, staffId) {474 TsLogging.LoggerBase.writeEvent("operationBlindCloseSharedShiftFailedOnRevertToSelfDuringCancellation", 40324, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The staff '" + staffId + "' fails to cancel the blind close shared shift operation for shift '" + shiftId + "' when reverting back from the elevated user.");475 };476 RetailLogger.peripheralsCashDrawerOpening = function (deviceName, deviceType) {477 TsLogging.LoggerBase.writeEvent("peripheralsCashDrawerOpening", 40400, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "CashDrawer Opening cash drawer. Name: {0}, Type: {1}.");478 };479 RetailLogger.peripheralsMSRKeyboardSwipeParserLog = function (message) {480 TsLogging.LoggerBase.writeEvent("peripheralsMSRKeyboardSwipeParserLog", 40401, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "{0}");481 };482 RetailLogger.peripheralsCompositeBarcodeScannerObjectNotDefined = function (objectName) {483 TsLogging.LoggerBase.writeEvent("peripheralsCompositeBarcodeScannerObjectNotDefined", 40402, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "CompositeBarcodeScanner _barcodesLazy {0} is not defined.");484 };485 RetailLogger.peripheralsHardwareStationContextActionRequestSucceeded = function (actionRequest) {486 TsLogging.LoggerBase.writeEvent("peripheralsHardwareStationContextActionRequestSucceeded", 40403, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "HardwareStationContext {0} success.");487 };488 RetailLogger.peripheralsHardwareStationContextActionRequestFailed = function (actionRequest, errors) {489 TsLogging.LoggerBase.writeEvent("peripheralsHardwareStationContextActionRequestFailed", 40404, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "HardwareStationContext {0} failed. Errors: {1}.");490 };491 RetailLogger.peripheralsUnsupportedPrinterType = function (printerType) {492 TsLogging.LoggerBase.writeEvent("peripheralsUnsupportedPrinterType", 40405, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Peripherals Facade Printer has an unsupported printer type '{0}'.");493 };494 RetailLogger.peripheralsBarcodeScannerGetDeviceSelectorFailed = function (errorMessage) {495 TsLogging.LoggerBase.writeEvent("peripheralsBarcodeScannerGetDeviceSelectorFailed", 40406, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "BarcodeScanner Facade Could not get a barcode device selector from Windows.Devices.PointOfService.BarcodeScanner - Error is: '{0}'.");496 };497 RetailLogger.peripheralsBarcodeScannerGetBluetoothDeviceSelectorFailed = function (errorMessage) {498 TsLogging.LoggerBase.writeEvent("peripheralsBarcodeScannerGetBluetoothDeviceSelectorFailed", 40407, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "BarcodeScanner Facade Could not get a bluetooth serial port device selector from Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceService - Error is: '{0}'.");499 };500 RetailLogger.peripheralsBarcodeScannerRfCommDeviceServiceNotFound = function () {501 TsLogging.LoggerBase.writeEvent("peripheralsBarcodeScannerRfCommDeviceServiceNotFound", 40408, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "BarcodeScanner Facade Could not find RfCommDeviceService... this could be a problem where the device use consent is not presented or device is not turned on etc.");502 };503 RetailLogger.peripheralsBarcodeScannerEnableFailed = function (errorMessage) {504 TsLogging.LoggerBase.writeEvent("peripheralsBarcodeScannerEnableFailed", 40409, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "BarcodeScanner Native Error enabling barcode scanner.");505 };506 RetailLogger.peripheralsMagneticStripeReaderGetDeviceSelectorFailed = function (errorMessage) {507 TsLogging.LoggerBase.writeEvent("peripheralsMagneticStripeReaderGetDeviceSelectorFailed", 40410, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "MagneticStripeReader Facade Could not get a msr device selector from Windows.Devices.PointOfService.MagneticStripeReader - Error is: '{0}'.");508 };509 RetailLogger.peripheralsMagneticStripeReaderGetBluetoothDeviceSelectorFailed = function (errorMessage) {510 TsLogging.LoggerBase.writeEvent("peripheralsMagneticStripeReaderGetBluetoothDeviceSelectorFailed", 40411, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "MagneticStripeReader Facade Could not get a bluetooth serial port device selector from Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceService - Error is: '{0}'.");511 };512 RetailLogger.peripheralsMagneticStripeReaderRfCommDeviceServiceNotFound = function () {513 TsLogging.LoggerBase.writeEvent("peripheralsMagneticStripeReaderRfCommDeviceServiceNotFound", 40412, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "MagneticStripeReader Facade Could not find RfCommDeviceService... this could be a problem where the device use consent is not presented or device is not turned on etc.");514 };515 RetailLogger.peripheralsMagneticStripeReaderInitializeFailed = function (errorMessage) {516 TsLogging.LoggerBase.writeEvent("peripheralsMagneticStripeReaderInitializeFailed", 40413, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "MagneticStripeReader Native Device failed to initialize due to error: '{0}'.");517 };518 RetailLogger.peripheralsMagneticStripeReaderEnableFailed = function (errorMessage) {519 TsLogging.LoggerBase.writeEvent("peripheralsMagneticStripeReaderEnableFailed", 40414, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "MagneticStripeReader Native Error enabling magnetic stripe reader: '{0}'.");520 };521 RetailLogger.peripheralsProximityOpenDeviceFailed = function (errorMessage) {522 TsLogging.LoggerBase.writeEvent("peripheralsProximityOpenDeviceFailed", 40418, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Peripherals Proximity Error opening device: '{0}'.");523 };524 RetailLogger.peripheralsProximityNotAvailable = function () {525 TsLogging.LoggerBase.writeEvent("peripheralsProximityNotAvailable", 40419, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Peripherals Proximity Device is not available.");526 };527 RetailLogger.peripheralsLongPollingLockGetDataError = function (errors) {528 TsLogging.LoggerBase.writeEvent("peripheralsLongPoolingLockGetDataError", 40421, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Peripherals LongPollingLock Failed to get data.: errors = '{0}'.");529 };530 RetailLogger.peripheralsLongPollingLockGetDataUnhandledError = function (message) {531 TsLogging.LoggerBase.writeEvent("peripheralsLongPoolingLockGetDataUnhandledError", 40422, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Peripherals LongPollingLock {0}");532 };533 RetailLogger.peripheralsNetworkPaymentTerminalIsNotSupported = function () {534 TsLogging.LoggerBase.writeEvent("peripheralsNetworkPaymentTerminalIsNotSupported", 40423, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "Network payment terminal is not supported for the application.");535 };536 RetailLogger.librariesWinJsListViewShown = function (elementId) {537 TsLogging.LoggerBase.writeEvent("LibrariesWinJsListViewShown", 40500, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The list view is shown. Element ID: '{0}'.");538 };539 RetailLogger.librariesWinJsListViewItemClick = function (elementId) {540 TsLogging.LoggerBase.writeEvent("LibrariesWinJsListViewItemClick", 40501, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "An item in the list view has been clicked. Element ID: '{0}'.");541 };542 RetailLogger.librariesNumpadEnterKey = function (textFieldValue) {543 TsLogging.LoggerBase.writeEvent("LibrariesNumpadEnterKey", 40600, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Numpad enter key was pressed. Text field value: '{0}'.");544 };545 RetailLogger.librariesAuthenticationProviderLoginStarted = function (requestId, details) {546 TsLogging.LoggerBase.writeEvent("librariesAuthenticationProviderLoginStarted", 40610, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Login is starting. {1} RequestId: {0}");547 };548 RetailLogger.librariesAuthenticationProviderLoginFinished = function (requestId, details) {549 TsLogging.LoggerBase.writeEvent("librariesAuthenticationProviderLoginFinished", 40611, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Login has finished. {1} RequestId: {0}");550 };551 RetailLogger.librariesAuthenticationProviderAcquireTokenStarted = function (requestId, resourceId) {552 TsLogging.LoggerBase.writeEvent("librariesAuthenticationProviderAcquireTokenStarted", 40612, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Starting: acquireToken for resource '{1}'. RequestId: {0}");553 };554 RetailLogger.librariesAuthenticationProviderAcquireTokenFinished = function (requestId) {555 TsLogging.LoggerBase.writeEvent("librariesAuthenticationProviderAcquireTokenFinished", 40613, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Finished: acquireToken. RequestId: {0}");556 };557 RetailLogger.helpersActivityHelperAddCartLinesStarted = function (correlationId) {558 TsLogging.LoggerBase.writeEvent("HelpersActivityHelperAddCartLineStarted", 40700, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Items added to cart started.");559 };560 RetailLogger.helpersActivityHelperAddCartLinesFinished = function (correlationId) {561 TsLogging.LoggerBase.writeEvent("HelpersActivityHelperAddCartLineFinished", 40701, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Items added to cart finished.");562 };563 RetailLogger.viewsLoginLoginViewSignInStarted = function () {564 TsLogging.LoggerBase.writeEvent("ViewsLoginLoginViewSignInStarted", 40800, 1, TsLogging.EventChannel.Admin, TsLogging.EventLevel.Informational, [], "", "", "Logon started.");565 };566 RetailLogger.viewsLoginLoginViewSignInFinished = function () {567 TsLogging.LoggerBase.writeEvent("ViewsLoginLoginViewSignInFinished", 40804, 1, TsLogging.EventChannel.Admin, TsLogging.EventLevel.Informational, [], "", "", "Logon finished.");568 };569 RetailLogger.viewsCloudDeviceActivationViewActivationFailed = function () {570 TsLogging.LoggerBase.writeEvent("ViewsCloudDeviceActivationViewActivationFailed", 40810, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The device activation operation failed.");571 };572 RetailLogger.viewsHomeTileClick = function (action) {573 TsLogging.LoggerBase.writeEvent("ViewsHomeTileClick", 40820, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "One of the tiles on the Home Page was clicked. Action: '{0}'.");574 };575 RetailLogger.viewsOrderPaymentViewPaymentInitiated = function () {576 TsLogging.LoggerBase.writeEvent("ViewsOrderPaymentViewPaymentInitiated", 40850, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Payment has been initiated from the 'Payment View'.");577 };578 RetailLogger.viewsCustomerDetailsLoaded = function () {579 TsLogging.LoggerBase.writeEvent("ViewsCustomerDetailsLoaded", 40890, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Customer Details page has fully loaded.");580 };581 RetailLogger.viewsCustomerDetailsError = function (errorCode, errorMessage) {582 TsLogging.LoggerBase.writeEvent("viewsCustomerDetailsError", 40891, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CustomerDetailsViewController: error message = '{1}'.");583 };584 RetailLogger.viewsCustomerDetailsAddCustomerFailed = function () {585 TsLogging.LoggerBase.writeEvent("viewsCustomerDetailsAddCustomerFailed", 40892, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CustomerDetailsViewController addCustomerToCart() failed.");586 };587 RetailLogger.viewsMerchandisingSearchViewSearchClick = function (searchTerm) {588 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingSearchViewSearchClick", 40900, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "A search has been initiated from the search view. Search term: '{0}'.");589 };590 RetailLogger.viewsMerchandisingSearchViewProductButtonClick = function (searchTerm) {591 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingSearchViewProductButtonClick", 40901, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The produt button has been clicked in the search view. Search term: '{0}'.");592 };593 RetailLogger.viewsMerchandisingSearchViewCustomerButtonClick = function (searchTerm) {594 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingSearchViewCustomerButtonClick", 40902, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The customer button has been clicked in the search view. Search term: '{0}'.");595 };596 RetailLogger.viewsMerchandisingSearchViewAddToCartClick = function (numberOfItems) {597 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingSearchViewAddToCartClick", 40903, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The 'Add to Sale' button was clicked on the Search View Page. Number of items: '{0}'.");598 };599 RetailLogger.viewsMerchandisingSearchViewQuickSaleClick = function (numberOfItems) {600 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingSearchViewQuickSaleClick", 40904, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The 'Sell Now' button was clicked on the Search View Page. Number of items: '{0}'.");601 };602 RetailLogger.viewsMerchandisingSearchViewInvalidProductOperation = function () {603 TsLogging.LoggerBase.writeEvent("viewsMerchandisingSearchViewInvalidProductOperation", 40907, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "SearchViewController productOperationHandler() Invalid product operation.");604 };605 RetailLogger.viewsMerchandisingSearchViewInvalidCustomerOperation = function () {606 TsLogging.LoggerBase.writeEvent("viewsMerchandisingSearchViewInvalidCustomerOperation", 40908, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "SearchViewController customerOperationHandler() Invalid product operation.");607 };608 RetailLogger.viewsMerchandisingProductDetailsLoadStarted = function () {609 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingProductDetailsLoadStarted", 40910, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The loading of the Product Details page has started.");610 };611 RetailLogger.viewsMerchandisingProductDetailsAddItem = function () {612 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingProductDetailsAddItem", 40911, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The 'Add Item' button on the Product Details page has been clicked.");613 };614 RetailLogger.viewsMerchandisingProductDetailsQuickSale = function () {615 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingProductDetailsQuickSale", 40912, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The 'Quick Sale' button on the Product Details page has been clicked.");616 };617 RetailLogger.viewsMerchandisingProductDetailsLoaded = function () {618 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingProductDetailsLoaded", 40913, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Product Details page has fully loaded.");619 };620 RetailLogger.viewsMerchandisingProductDetailsKitVariantNotFound = function (kitVariantId, productId) {621 TsLogging.LoggerBase.writeEvent("viewsMerchandisingProductDetailsKitVariantNotFound", 40914, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ProductDetailsViewController Kit Variant {0} not found as part of the variant information in product id {1}.");622 };623 RetailLogger.viewsMerchandisingPriceCheckViewGetPriceFinished = function () {624 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingPriceCheckViewGetPriceFinished", 40930, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The price for a specific item was successfully retrieved.");625 };626 RetailLogger.viewsMerchandisingCatalogsCatalogClicked = function (catalogId, catalogName) {627 TsLogging.LoggerBase.writeEvent("ViewsMerchandisingCatalogsCatalogClicked", 40936, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "A catalog was clicked in the Catalogs Page. Catalog ID: '{0}'. Catalog Name: '{1}'.");628 };629 RetailLogger.viewsMerchandisingCategoriesViewLoaded = function () {630 TsLogging.LoggerBase.writeEvent("viewsMerchandisingCategoriesViewLoaded", 40940, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Categories Page was successfully loaded.");631 };632 RetailLogger.viewsCartCartViewPayQuickCash = function () {633 TsLogging.LoggerBase.writeEvent("ViewsCartCartViewPayQuickCash", 44000, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Checking out with quick cash.");634 };635 RetailLogger.viewsCartCartViewShowPrintDialogFailed = function (errorCode, errorMessage) {636 TsLogging.LoggerBase.writeEvent("viewsCartCartViewShowPrintDialogFailed", 44001, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CartViewController showPrintDialog() failed: error message = '{1}'.");637 };638 RetailLogger.viewsCartShowJournalViewLoaded = function () {639 TsLogging.LoggerBase.writeEvent("ViewsCartShowJournalViewLoaded", 44050, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Show Journal View has successfully loaded.");640 };641 RetailLogger.viewsCartShowJournalViewRetrieveProductFailed = function (productId) {642 TsLogging.LoggerBase.writeEvent("viewsCartShowJournalViewRetrieveProductFailed", 44051, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "ShowJournalViewController Failed to retrieve product with Id {0}.");643 };644 RetailLogger.viewsControlsCommonHeaderSearch = function (searchTerm) {645 TsLogging.LoggerBase.writeEvent("ViewsControlsCommonHeaderSearch", 44100, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "A search has been initiated from the nav bar. Search term: '{0}'.");646 };647 RetailLogger.viewsControlsCommonHeaderFilterIconClick = function () {648 TsLogging.LoggerBase.writeEvent("ViewsControlsCommonHeaderFilterIconClick", 44101, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The filter icon in the nav bar was clicked.");649 };650 RetailLogger.viewsControlsCommonHeaderCategoryInTreeClicked = function (categoryName) {651 TsLogging.LoggerBase.writeEvent("ViewsControlsCommonHeaderCategoryInTreeClicked", 44105, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "One of the categories in the Category Tree of the nav bar was clicked. Category Name: '{0}'.");652 };653 RetailLogger.viewsControlsModalDialogRendered = function () {654 TsLogging.LoggerBase.writeEvent("ViewsControlsModalDialogRendered", 44110, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Modal Dialog has been successfully rendered.");655 };656 RetailLogger.viewsControlsRefinersApplyFilters = function () {657 TsLogging.LoggerBase.writeEvent("ViewsControlsRefinersApplyFilters", 44116, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The 'Apply Filters' button on the filter nav bar was clicked.");658 };659 RetailLogger.viewsControlsRefinersTypeNotSupported = function (refiner) {660 TsLogging.LoggerBase.writeEvent("viewsControlsRefinersTypeNotSupported", 44118, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "RefinerControl Refiner Type Value not supported: data: {0}.");661 };662 RetailLogger.viewsControlsRefinersDisplayTemplateNotSupported = function (refiner) {663 TsLogging.LoggerBase.writeEvent("viewsControlsRefinersDisplayTemplateNotSupported", 44119, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "RefinerControl Refiner DisplayTemplate not supported: data: {0}.");664 };665 RetailLogger.viewsControlsRefinersWrongInputParameters = function (refiner) {666 TsLogging.LoggerBase.writeEvent("viewsControlsRefinersWrongInputParameters", 44120, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "RefinerControl Wrong input paramters: data: {0}.");667 };668 RetailLogger.viewsControlsPrintReceiptShown = function () {669 TsLogging.LoggerBase.writeEvent("ViewsControlsPrintReceiptShown", 44130, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Print Receipt dialog is shown.");670 };671 RetailLogger.viewsControlsPrintReceiptSkipped = function () {672 TsLogging.LoggerBase.writeEvent("ViewsControlsPrintReceiptSkipped", 44131, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The Print Receipt dialog was not shown and skipped to print directly.");673 };674 RetailLogger.viewsControlsPrintReceiptPrinted = function () {675 TsLogging.LoggerBase.writeEvent("ViewsControlsPrintReceiptPrinted", 44132, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The receipts were printed.");676 };677 RetailLogger.viewsControlsCashbackDialogOnShowingParametersUndefined = function () {678 TsLogging.LoggerBase.writeEvent("viewsControlsCashbackDialogOnShowingParametersUndefined", 44140, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CashbackDialog onShowing failed. Parameter options is null or undefined.");679 };680 RetailLogger.viewsControlsOrderCheckoutDialogOnShowingParametersUndefined = function () {681 TsLogging.LoggerBase.writeEvent("viewsControlsOrderCheckoutDialogOnShowingParametersUndefined", 44160, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "OrderCheckoutDialog onShowing failed. Parameter options is null or undefined.");682 };683 RetailLogger.viewsMerchandisingAllStoresViewConstructorArgumentUndefined = function (argument) {684 TsLogging.LoggerBase.writeEvent("viewsMerchandisingAllStoresViewConstructorArgumentUndefined", 44180, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AllStoresView constructor: Argument '{0}' is null or undefined.");685 };686 RetailLogger.viewsMerchandisingPickingAndReceivingDetailsViewLoadJournalFailed = function (journalId) {687 TsLogging.LoggerBase.writeEvent("viewsMerchandisingPickingAndReceivingDetailsViewLoadJournalFailed", 44190, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingDetailsView Failed to load journal with journal Id {0}.");688 };689 RetailLogger.viewsCustomerAddEditViewAddCustomerFailed = function () {690 TsLogging.LoggerBase.writeEvent("viewsCustomerAddEditViewAddCustomerFailed", 44200, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CustomerAddEditView addCustomerToCart() failed.");691 };692 RetailLogger.viewsCustomerAddEditViewAddUpdateNewCustomerFailed = function () {693 TsLogging.LoggerBase.writeEvent("viewsCustomerAddEditViewAddUpdateNewCustomerFailed", 44201, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CustomerAddEditView addUpdateNewCustomer() failed.");694 };695 RetailLogger.viewsCustomerPickUpInStoreViewBingMapsFaild = function (message) {696 TsLogging.LoggerBase.writeEvent("viewsCustomerPickUpInStoreViewBingMapsFaild", 44210, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickUpInStoreView Bing maps control Failed: {0}.");697 };698 RetailLogger.viewsCustomerPickUpInStoreViewBingMapsFailedToInitialize = function (message) {699 TsLogging.LoggerBase.writeEvent("viewsCustomerPickUpInStoreViewBingMapsFailedToInitialize", 44211, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickUpInStoreView Bing maps control failed to initialize: {0}.");700 };701 RetailLogger.viewsCustomerAddressAddEditViewDownloadTaxGroupsFailed = function (errorCode, errorMessage) {702 TsLogging.LoggerBase.writeEvent("viewsCustomerAddressAddEditViewDownloadTaxGroupsFailed", 44220, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AddressAddEditView Failed when downloading sales tax groups: error message = '{1}'.");703 };704 RetailLogger.viewsDailyOperationsCashManagementViewOperationFailed = function (errorCode, errorMessage) {705 TsLogging.LoggerBase.writeEvent("viewsDailyOperationsCashManagementViewOperationFailed", 44230, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CashManagementView operationSuccessCallback() failed: error message = '{1}'.");706 };707 RetailLogger.viewsControlsKnockoutCustomerCardDataPropertyRequired = function () {708 TsLogging.LoggerBase.writeEvent("viewsControlsKnockoutCustomerCardDataPropertyRequired", 44240, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "knockout.customerCard the data property is required.");709 };710 RetailLogger.viewsControlsKnockoutParallaxBackgroundElementRequired = function () {711 TsLogging.LoggerBase.writeEvent("viewsControlsKnockoutParallaxBackgroundElementRequired", 44241, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "knockout.parallax A parallax background element class, id, or tagname is required.");712 };713 RetailLogger.viewsTutorialVideoDialogVideoElementThrowsError = function (errorMessage) {714 TsLogging.LoggerBase.writeEvent("viewsTutorialVideoDialogVideoElementThrowsError", 44260, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Video element throws an error. Details: {0}.");715 };716 RetailLogger.viewModelCartAddProductsToCart = function () {717 TsLogging.LoggerBase.writeEvent("ViewModelCartAddProductsToCart", 44300, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The cart has been updated with a set of products.");718 };719 RetailLogger.viewModelCartVoidProductsStarted = function () {720 TsLogging.LoggerBase.writeEvent("viewModelCartVoidProductsStarted", 44310, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Product void has started.");721 };722 RetailLogger.viewModelCartVoidProductsFinished = function (success) {723 TsLogging.LoggerBase.writeEvent("viewModelCartVoidProductsFinished", 44311, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Product void has finished. Success: {0}.");724 };725 RetailLogger.viewModelCartGetProductDetailsFailed = function () {726 TsLogging.LoggerBase.writeEvent("viewModelCartGetProductDetailsFailed", 44312, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CartViewModel getProductDetailsAsync() failed.");727 };728 RetailLogger.viewModelGetCustomerBalanceFailed = function (errorCode, errorMessage) {729 TsLogging.LoggerBase.writeEvent("viewModelGetCustomerBalanceFailed", 44313, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CartViewModel getCustomerBalanceAsync() failed: error message = '{1}'.");730 };731 RetailLogger.viewModelGetCustomerLoyaltyCardsFailed = function (errorCode, errorMessage) {732 TsLogging.LoggerBase.writeEvent("viewModelGetCustomerLoyaltyCardsFailed", 44314, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CartViewModel getCustomerLoyaltyCardsAsync() failed: error message = '{1}'.");733 };734 RetailLogger.viewModelUnsupportedBarcodeMaskType = function (maskType) {735 TsLogging.LoggerBase.writeEvent("viewModelUnsupportedBarcodeMaskType", 44315, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CartViewModel a bar code with unsupported mask type, {0}, was scanned.");736 };737 RetailLogger.viewModelCartProcessScanResultStarted = function (correlationId, barcodeMaskType) {738 TsLogging.LoggerBase.writeEvent("viewModelCartProcessItemScanStarted", 44316, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "CartViewModel processing scan result with barcode mask type {1} started.");739 };740 RetailLogger.viewModelCartProcessScanResultFinished = function (correlationId, successful) {741 TsLogging.LoggerBase.writeEvent("viewModelCartProcessItemScanFinished", 44317, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "CartViewModel processing scan result " + successful ? "finished successfully." : "failed.");742 };743 RetailLogger.viewModelLoginDeviceActivationFailed = function (deviceId, terminalId, errorResourceIds) {744 TsLogging.LoggerBase.writeEvent("ViewModelLoginDeviceActivationFailed", 44400, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The device activation call failed for device {0}, terminal {1} due to {2}.");745 };746 RetailLogger.viewModelLoginRetrieveUserAuthenticationTokenFailed = function (tokenResourceId, errorDetails) {747 TsLogging.LoggerBase.writeEvent("ViewModelLoginRetrieveUserAuthenticationTokenFailed", 44401, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Retrieving user authentication token for resource identifier '{0}' failed with error: {1}.");748 };749 RetailLogger.viewModelLoginRetailServerDiscoveryFailed = function (locatorServiceUrl, tenantId, errorDetails) {750 TsLogging.LoggerBase.writeEvent("ViewModelLoginRetailServerDiscoveryFailed", 44402, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Could not resolve retail server url from locator service at '{0}' for tenantId: '{1}'. Error was: '{2}'.");751 };752 RetailLogger.viewModelLoginRetrieveDeviceInformationFailed = function () {753 TsLogging.LoggerBase.writeEvent("ViewModelLoginRetrieveDeviceInformationFailed", 44403, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The device token and/or device identifier could not be found in persistent store during logon attempt.");754 };755 RetailLogger.viewModelLoginFailed = function (errorCode, errorMessage) {756 TsLogging.LoggerBase.writeEvent("viewModelLoginFailed", 44404, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "LoginViewModel Logon failed: error message = '{1}'.");757 };758 RetailLogger.viewModelDeleteExpiredSessionFailed = function (statusText) {759 TsLogging.LoggerBase.writeEvent("ViewModelDeleteExpiredSessionFailed", 44500, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The request to delete expired session records failed with error: {0}.");760 };761 RetailLogger.viewModelRetrieveBlobStorageUriFailed = function () {762 TsLogging.LoggerBase.writeEvent("ViewModelRetrieveBlobStorageUriFailed", 44501, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Failed to retrieve download session url from blob storage. Some download sessions are failed to download.");763 };764 RetailLogger.viewModelGetTerminalIdFailed = function () {765 TsLogging.LoggerBase.writeEvent("ViewModelGetTerminalIdFailed", 44502, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Failed to get terminalId.");766 };767 RetailLogger.viewModelGetTerminalDataStoreNameFailed = function (terminalId) {768 TsLogging.LoggerBase.writeEvent("ViewModelGetTerminalDataStoreNameFailed", 44503, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.GetTerminalDataStoreNameAsync(), Failed to get data store name by terminalId: {0}.");769 };770 RetailLogger.viewModelGetDownloadIntervalFailed = function (dataStoreName) {771 TsLogging.LoggerBase.writeEvent("ViewModelGetDownloadIntervalFailed", 44504, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.GetDownloadIntervalAsync(), Failed to get download interval from data store name: {0 }.");772 };773 RetailLogger.viewModelCheckInitialSyncFailed = function (statusText) {774 TsLogging.LoggerBase.writeEvent("ViewModelCheckInitialSyncFailed", 44505, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "CheckInitialDataSyncResponseMessage: {0}.");775 };776 RetailLogger.viewModelGetDownloadSessionsFailed = function (dataStoreName) {777 TsLogging.LoggerBase.writeEvent("ViewModelGetDownloadSessionsFailed", 44506, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.GetDownloadSessionsAsync(), Failed to get download sessions from data store name: {0}.");778 };779 RetailLogger.viewModelDownloadFileFailed = function (statusText) {780 TsLogging.LoggerBase.writeEvent("ViewModelDownloadFileFailed", 44507, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "DownloadFileResponseMessage: {0}.");781 };782 RetailLogger.viewModelDownloadFileBrokerRequestFailed = function (errorMessage) {783 TsLogging.LoggerBase.writeEvent("ViewModelDownloadFileBrokerRequestFailed", 44508, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Microsoft.Dynamics.Commerce.ClientBroker.DownloadFileRequest.executeAsync() Failed. Errors: {0}");784 };785 RetailLogger.viewModelApplyToOfflineDbFailed = function (statusText) {786 TsLogging.LoggerBase.writeEvent("ViewModelApplyToOfflineDbFailed", 44509, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncClientResponseMessage: {0}");787 };788 RetailLogger.viewModelApplyToOfflineDbBrokerRequestFailed = function (statusText) {789 TsLogging.LoggerBase.writeEvent("ViewModelApplyToOfflineDbBrokerRequestFailed", 44510, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Microsoft.Dynamics.Commerce.ClientBroker.ApplyToOfflineDatabaseRequest.executeAsync(() Failed. Errors: {0}");790 };791 RetailLogger.viewModelUpdateDownloadSessionStatusBrokerRequestFailed = function (statusText) {792 TsLogging.LoggerBase.writeEvent("ViewModelUpdateDownloadSessionStatusBrokerRequestFailed", 44511, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncClientResponseMessage: {0}");793 };794 RetailLogger.viewModelUpdateDownloadSessionStatusFailed = function () {795 TsLogging.LoggerBase.writeEvent("ViewModelUpdateDownloadSessionStatusFailed", 44512, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.UpdateDownloadSessionAsync(), Failed to update download session status");796 };797 RetailLogger.viewModelGetUploadIntervalFailed = function (dataStoreName) {798 TsLogging.LoggerBase.writeEvent("ViewModelGetUploadIntervalFailed", 44513, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.GetUploadIntervalAsync(), Failed to get upload interval for data store name: {0}");799 };800 RetailLogger.viewModelGetUploadJobDefinitionsFailed = function (dataStoreName) {801 TsLogging.LoggerBase.writeEvent("ViewModelGetUploadJobDefinitionsFailed", 44514, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.GetUploadJobDefinitionsAsync(), Failed to get upload job definitions for data store name: {0}");802 };803 RetailLogger.viewModelLoadUploadTransactionsFailed = function (statusText) {804 TsLogging.LoggerBase.writeEvent("ViewModelLoadUploadTransactionsFailed", 44515, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "LoadUploadTransactionResponseMessage: {0}");805 };806 RetailLogger.viewModelSyncOfflineTransactionsFailed = function () {807 TsLogging.LoggerBase.writeEvent("ViewModelSyncOfflineTransactionsFailed", 44516, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.SyncOfflineTransactionAsync(), Failed to post offline transaction data.");808 };809 RetailLogger.viewModelPurgeOfflineTransactionsFailed = function (statusText) {810 TsLogging.LoggerBase.writeEvent("ViewModelPurgeOfflineTransactionsFailed", 44517, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncClientResponseMessage: {0}.");811 };812 RetailLogger.viewModelGetDownloadLinkFailed = function (dataStoreName, downloadSessionId) {813 TsLogging.LoggerBase.writeEvent("ViewModelGetDownloadLinkFailed", 44518, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AsyncServiceViewModel.GetDownloadLinkAsync(), Failed to get download link from data store name: {0} and download session id: {1}.");814 };815 RetailLogger.viewModelGetOfflineSyncStatsFailed = function (statusText) {816 TsLogging.LoggerBase.writeEvent("ViewModelGetOfflineSyncStatsFailed", 44519, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Failed to load offline sync records from offline database. Error message: {0}.");817 };818 RetailLogger.viewModelProductDetailsComponentsNotInKit = function () {819 TsLogging.LoggerBase.writeEvent("viewModelProductDetailsComponentsNotInKit", 44600, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "ProductDetailsViewModel Components are not defined for this kit.");820 };821 RetailLogger.viewModelProductDetailsKitVariantNotFound = function (kitVariantId, productId) {822 TsLogging.LoggerBase.writeEvent("viewModelProductDetailsKitVariantNotFound", 44601, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "ProductDetailsViewModel Kit Variant {0} not found as part of the variant information in product id {1}.");823 };824 RetailLogger.viewModelKitDisassemblyRetrievedKitProduct = function () {825 TsLogging.LoggerBase.writeEvent("viewModelKitDisassemblyRetrievedKitProduct", 44700, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Verbose, [], "", "", "KitDisassemblyViewModel Retrieved kit product.");826 };827 RetailLogger.viewModelKitDisassemblyKitDisassemblyBlocked = function () {828 TsLogging.LoggerBase.writeEvent("viewModelKitDisassemblyKitDisassemblyBlocked", 44701, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "KitDisassemblyViewModel Kit is blocked from being disassembled at a register.");829 };830 RetailLogger.viewModelAddressAddEditGetAddressFromZipCodeFailed = function () {831 TsLogging.LoggerBase.writeEvent("viewModelAddressAddEditGetAddressFromZipCodeFailed", 44800, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AddressAddEditViewModel getAddressFromZipCodeAsync() failed.");832 };833 RetailLogger.viewModelGetAffiliationsFailed = function () {834 TsLogging.LoggerBase.writeEvent("viewModelGetAffiliationsFailed", 44900, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "AffiliationsViewModel getAffiliationsAsync() failed.");835 };836 RetailLogger.viewModelPriceCheckContextEntitySetNone = function () {837 TsLogging.LoggerBase.writeEvent("viewModelPriceCheckContextEntitySetNone", 45000, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PriceCheckViewModel actionOnContextEntitySetCompletion() A method with PriceCheckContextEntitySet ID 'None' was reported.");838 };839 RetailLogger.viewModelPriceCheckContextEntitySetMultipleTimes = function (entitySetId) {840 TsLogging.LoggerBase.writeEvent("viewModelPriceCheckContextEntitySetMultipleTimes", 45001, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PriceCheckViewModel actionOnContextEntitySetCompletion() A method with PriceCheckContextEntitySet ID {0} was reported multiple times.");841 };842 RetailLogger.viewModelPriceCheckContextEntitySetNoMethod = function () {843 TsLogging.LoggerBase.writeEvent("viewModelPriceCheckContextEntitySetNoMethod", 45002, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PriceCheckViewModel actionOnContextEntitySetCompletion() The value PriceCheckContextEntitySet.All does not represent the number of methods that can be run.");844 };845 RetailLogger.viewModelPriceCheckGetProductPriceFailed = function (errorCode, errorMessage) {846 TsLogging.LoggerBase.writeEvent("viewModelPriceCheckGetProductPriceFailed", 45003, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PriceCheckViewModel load.getProductPrice() failed when getting product price: error message = '{1}'.");847 };848 RetailLogger.viewModelPriceCheckGetCustomerFailed = function (errorCode, errorMessage) {849 TsLogging.LoggerBase.writeEvent("viewModelPriceCheckGetCustomerFailed", 45004, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PriceCheckViewModel load.getCustomer() failed when getting customer: error message = '{1}'.");850 };851 RetailLogger.viewModelPriceCheckGetStoreDetailsFailed = function (errorCode, errorMessage) {852 TsLogging.LoggerBase.writeEvent("viewModelPriceCheckGetStoreDetailsFailed", 45005, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PriceCheckViewModel load.getStoreDetailsAsync() failed when getting store: error message = '{1}'.");853 };854 RetailLogger.viewModelPriceCheckGetActivePriceFailed = function (errorCode, errorMessage) {855 TsLogging.LoggerBase.writeEvent("viewModelPriceCheckGetActivePriceFailed", 45006, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PriceCheckViewModel load.getProductPrice() failed when getting product price: error code = '{0}', error message = '{1}'.");856 };857 RetailLogger.viewModelPaymentCardSwipeNotSupported = function (operationId) {858 TsLogging.LoggerBase.writeEvent("viewModelPaymentCardSwipeNotSupported", 45100, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "PaymentViewModel Card swipe is not supported for payment operation id {0}.");859 };860 RetailLogger.viewModelCustomerAddEditUnknownCustomerType = function (customerType) {861 TsLogging.LoggerBase.writeEvent("viewModelCustomerAddEditUnknownCustomerType", 45200, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Warning, [], "", "", "CustomerAddEditViewModel Unknown CustomerType: {0}.");862 };863 RetailLogger.viewModelStockCountDetailsSearchProductsByItemsFailed = function () {864 TsLogging.LoggerBase.writeEvent("viewModelStockCountDetailsSearchProductsByItemsFailed", 45300, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "StockCountDetailsViewModel Failed to do operation searchProductsByItemIdsAsync.");865 };866 RetailLogger.viewModelStoreOperationsGetCurrenciesForStoreFailed = function () {867 TsLogging.LoggerBase.writeEvent("viewModelStoreOperationsGetCurrenciesForStoreFailed", 45400, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "StoreOperationsViewModel getCurrenciesForCurrentStoreAsync() failed.");868 };869 RetailLogger.viewModelPickingAndReceivingDetailsSearchProductsByIdFailed = function () {870 TsLogging.LoggerBase.writeEvent("viewModelPickingAndReceivingDetailsSearchProductsByIdFailed", 45500, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "PickingAndReceivingDetailsViewModel Failed to do operation searchProductsByItemIdsAsync.");871 };872 RetailLogger.cloudPosBrowserNotSupported = function (userAgentDetails, errorDetails) {873 TsLogging.LoggerBase.writeEvent("CloudPosBrowserNotSupported", 45600, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "The browser being used ({0}) is not supported. {1}.");874 };875 RetailLogger.coreOperationValidatorsNoCartOnCartValidator = function (src) {876 TsLogging.LoggerBase.writeEvent("operationValidatorFailed", 45800, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "OperationValidators validator {0} failed - Cart is undefined.");877 };878 RetailLogger.viewModelProductSearchViewModelSearchProductsByTextFailed = function (searchText, refinerValues, error) {879 TsLogging.LoggerBase.writeEvent("viewModelProductSearchViewModelSearchProductsByTextFailed", 46000, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Search by text failed. Search text: '{0}', Refiner values: '{1}', Error: {2}.");880 };881 RetailLogger.viewModelProductSearchViewModelGetRefinersByTextFailed = function (searchText, error) {882 TsLogging.LoggerBase.writeEvent("viewModelProductSearchViewModelGetRefinersByTextFailed", 46001, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Get refiners by text failed. Search text: '{0}' Error: {1}.");883 };884 RetailLogger.viewModelProductSearchViewModelGetRefinerValuesByTextFailed = function (searchText, refinerId, refinerSourceValue, error) {885 TsLogging.LoggerBase.writeEvent("viewModelProductSearchViewModelGetRefinerValuesByTextFailed", 46002, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Get refiner values by text failed. Search text: '{0}', Refiner Id: '{1}', Refiner source value: '{2}', Error: {3}.");886 };887 RetailLogger.viewModelProductsViewModelAddItemsToCart = function (itemDetails, isQuickSale) {888 TsLogging.LoggerBase.writeEvent("viewModelProductsViewModelAddItemsToCart", 46050, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "The 'Add Item' action in the Products view model has been initiated. Item details: {0}, Is quick sale: '{1}'");889 };890 RetailLogger.viewsModelProductsViewModelSearchProductsByCategoryFailed = function (categoryId, refinerValues, error) {891 TsLogging.LoggerBase.writeEvent("viewsModelProductsViewModelSearchProductsByCategoryFailed", 46051, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Search by category failed. Category Id: '{0}', Refiner values: '{1}', Error: {2}.");892 };893 RetailLogger.viewsModelProductsViewModelGetRefinersByCategoryFailed = function (categoryId, error) {894 TsLogging.LoggerBase.writeEvent("viewsModelProductsViewModelGetRefinersByCategoryFailed", 46052, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Get refiners by category failed. Category Id: '{0}', Error: {1}.");895 };896 RetailLogger.viewsModelProductsViewModelGetRefinerValuesByCategoryFailed = function (categoryId, refinerId, refinerSourceValue, error) {897 TsLogging.LoggerBase.writeEvent("viewsModelProductsViewModelGetRefinerValuesByCategoryFailed", 46053, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Get refiner values by category failed. Category Id: '{0}', Refiner Id: '{1}', Refiner source value: '{2}', Error: {3}.");898 };899 RetailLogger.viewModelProductsViewModelGetProductDetailsFailed = function (productSearchCriteria, error) {900 TsLogging.LoggerBase.writeEvent("viewModelProductsViewModelGetProductDetailsFailed", 46054, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Get product details by search criteria failed. Search criteria: {0}, Error: '{1}'");901 };902 RetailLogger.viewModelSearchViewModelAddCustomerToCartFailed = function (customerAccountNumber, error) {903 TsLogging.LoggerBase.writeEvent("viewModelSearchViewModelAddCustomerToCartFailed", 46100, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Add customer to cart failed. Customer account number: {0}, Error: {1}");904 };905 RetailLogger.viewModelSearchViewModelGetProductDetailsFailed = function (productSearchCriteria, error) {906 TsLogging.LoggerBase.writeEvent("viewModelSearchViewModelGetProductDetailsFailed", 46101, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Get product details by search criteria failed. Search criteria: {0}, Error: '{1}'");907 };908 RetailLogger.taskRecorderContinueRecording = function (sessionId, sessionName) {909 TsLogging.LoggerBase.writeEvent("TaskRecorderContinueRecording", 46150, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The session ID:{0}, Name:{1} - RecordingViewModel continueRecording()");910 };911 RetailLogger.taskRecorderPauseRecording = function (sessionId, sessionName) {912 TsLogging.LoggerBase.writeEvent("TaskRecorderPauseRecording", 46151, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The session ID:{0}, Name:{1} - RecordingViewModel pauseRecording()");913 };914 RetailLogger.taskRecorderStopRecording = function (sessionId, sessionName) {915 TsLogging.LoggerBase.writeEvent("TaskRecorderStopRecording", 46152, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The session ID:{0}, Name:{1} - RecordingViewModel stopRecording()");916 };917 RetailLogger.taskRecorderEndTask = function (sessionId, sessionName) {918 TsLogging.LoggerBase.writeEvent("TaskRecorderEndTask", 46153, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "The session ID:{0}, Name:{1} - RecordingViewModel endTask()");919 };920 RetailLogger.taskRecorderHandleAction = function (actionText) {921 TsLogging.LoggerBase.writeEvent("TaskRecorderHandleAction", 46154, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "{0} - TaskRecorderEventListener handleAction()");922 };923 RetailLogger.taskRecorderScreenshotsUploadingFailed = function (errors) {924 TsLogging.LoggerBase.writeEvent("TaskRecorderScreenshotsUploadingFailed", 46155, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Screenshots uploading to Azure failed. Errors: {0} .");925 };926 RetailLogger.taskRecorderDownloadFile = function (sourceUrl, destinationPath) {927 TsLogging.LoggerBase.writeEvent("TaskRecorderDownloadFile", 46156, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Source url: {0} , Destination path: {1} . - TaskRecorderDownloadHelper downloadFile()");928 };929 RetailLogger.taskRecorderShowSaveDialog = function (suggestedFileName, fileTypeChoice) {930 TsLogging.LoggerBase.writeEvent("TaskRecorderShowSaveDialog", 46157, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Suggested file name: {0} , File type choice: {1} . - TaskRecorderDialogHelper showSaveDialog()");931 };932 RetailLogger.taskRecorderSavingFileFailed = function (errors) {933 TsLogging.LoggerBase.writeEvent("TaskRecorderSavingFileFailed", 46158, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Saving file failed. Errors: {0} .");934 };935 RetailLogger.taskRecorderSavingFileFinished = function (url) {936 TsLogging.LoggerBase.writeEvent("TaskRecorderSaveFileFinished", 46159, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Saving file was finished. URL: {0} . - TaskRecorderManager saveFile()");937 };938 RetailLogger.taskRecorderSavingFileCanceled = function (url) {939 TsLogging.LoggerBase.writeEvent("TaskRecorderSavingFileCanceled", 46160, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "Saving file was canceled. URL: {0} . - TaskRecorderManager saveFile()");940 };941 RetailLogger.taskRecorderFileWasSaved = function (fileName) {942 TsLogging.LoggerBase.writeEvent("TaskRecorderFileWasSaved", 46161, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Informational, [], "", "", "File {0} was saved. - TaskRecorderDownloadHelper downloadFile()");943 };944 RetailLogger.taskRecorderSaveXMLFailed = function (sessionId, errors) {945 TsLogging.LoggerBase.writeEvent("taskRecorderSaveXMLFailed", 46162, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Some error occurred in exporting the XML file. Session id: {0}. Error details: {1}. - CompleteRecordingViewModel saveRecording()");946 };947 RetailLogger.taskRecorderSaveTrainingDocumentFailed = function (sessionId, errors) {948 TsLogging.LoggerBase.writeEvent("taskRecorderSaveTrainingDocumentFailed", 46163, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Some error occurred in exporting the word document. Session id: {0}. Error details: {1}. - CompleteRecordingViewModel saveWordDocument()");949 };950 RetailLogger.taskRecorderDeleteFolderFromLocalStorageFailed = function (folder, errors) {951 TsLogging.LoggerBase.writeEvent("taskRecorderDeleteFolderFromLocalStorageFailed", 46164, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Delete folder '{0}' from local storage failed. Errors: {1}.");952 };953 RetailLogger.taskRecorderSaveBpmPackageFailed = function (sessionId, errors) {954 TsLogging.LoggerBase.writeEvent("taskRecorderSaveBpmPackageFailed", 46165, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Some error occurred in exporting the BPM package. Session id: {0}. Error details: {1}. - CompleteRecordingViewModel saveBpmPackage()");955 };956 RetailLogger.taskRecorderSaveSessionAsRecordingBundleFailed = function (sessionId) {957 TsLogging.LoggerBase.writeEvent("taskRecorderSaveSessionAsRecordingBundleFailed", 46166, 1, TsLogging.EventChannel.Operational, TsLogging.EventLevel.Error, [], "", "", "Some error occurred in saving session as recording bundle. Session id: {0}. - CompleteRecordingViewModel saveToThisPC()");958 };959 RetailLogger.viewsAsyncImageControlInvalidDefaultImage = function () {960 TsLogging.LoggerBase.writeEvent("viewsAsyncImageControlInvalidDefaultImage", 46300, 1, TsLogging.EventChannel.Debug, TsLogging.EventLevel.Informational, [], "", "", "Invalid default image set. It is either null or undefined.");961 };962 Object.defineProperty(RetailLogger, "genericError",963 __decorate([964 __param(0, Commerce.CustomerContent), 965 __metadata('design:type', Function), 966 __metadata('design:paramtypes', [String]), 967 __metadata('design:returntype', void 0)968 ], RetailLogger, "genericError", Object.getOwnPropertyDescriptor(RetailLogger, "genericError")));969 Object.defineProperty(RetailLogger, "genericWarning",970 __decorate([971 __param(0, Commerce.CustomerContent), 972 __metadata('design:type', Function), 973 __metadata('design:paramtypes', [String]), 974 __metadata('design:returntype', void 0)...

Full Screen

Full Screen

run-command.js

Source:run-command.js Github

copy

Full Screen

...165// a command's event, the error should be propogated.166test('applyEvent throws error', async t => {167 const { runCommand, eventRepository } = await setupTest();168 const cityId = shortid.generate();169 await eventRepository.writeEvent({170 aggregateName: 'brokenCity',171 aggregateId: cityId,172 eventId: uuid(),173 type: 'CREATED',174 payload: { cityId },175 metadata: {},176 sequenceNumber: 1,177 });178 // This should trigger an event of type 'BAD_EVENT', which in turn179 // should trigger an error in the brokenCity aggregate's applyEvent().180 await t.throwsAsync(181 runCommand('generateBadEvent', { cityId }),182 EventPayloadError,183 'error thrown when command creates an event that fails at applyEvent',184 );185});186// If an aggregate's validateState() function throws an error after applying a187// command's event, the error should be propogated.188test('validateState throws error', async t => {189 const { runCommand, eventRepository, libraryId } = await setupTest();190 await eventRepository.writeEvent({191 aggregateName: 'library',192 aggregateId: libraryId,193 eventId: uuid(),194 type: 'CREATED',195 payload: { libraryId },196 metadata: {},197 sequenceNumber: 1,198 });199 // This violate's the library's invariant that an active library must have a200 // name.201 await t.throwsAsync(202 runCommand('activateLibrary', { libraryId }),203 InvariantViolatedError,204 'error thrown when command creates an event that validateState rejects',205 );206});207// We should retry a command if the event repo's writeEvent() returns false.208// Test when a command does not have a specific retry number set - we should use209// our default retries.210test('retries - using defaultCommandRetries', async t => {211 const { runCommand, eventRepository, libraryId } = await setupTest();212 await eventRepository.writeEvent({213 aggregateName: 'library',214 aggregateId: libraryId,215 eventId: uuid(),216 type: 'CREATED',217 payload: { libraryId },218 metadata: {},219 sequenceNumber: 1,220 });221 // Now setup event repo so that writes always fail222 const writeEvent = sinon.fake.resolves(false);223 sinon.replace(eventRepository, 'writeEvent', writeEvent);224 // Note: setLibraryCityName has no specific retries value, so we should use default225 await t.throwsAsync(226 runCommand('setLibraryCityName', { libraryId, name: 'Encino' }),227 MaxCommandAttemptsError,228 'error thrown when we reach max retries trying to write event',229 );230 t.is(writeEvent.callCount, 5, 'writeEvent() called 5 times');231});232// We should retry a command if the event repo's writeEvent() returns false.233// Test when a command has a specific retry number set that overrides the234// default.235test('retries - command specific setting', async t => {236 const { runCommand, eventRepository, libraryId } = await setupTest();237 await eventRepository.writeEvent({238 aggregateName: 'library',239 aggregateId: libraryId,240 eventId: uuid(),241 type: 'CREATED',242 payload: { libraryId },243 metadata: {},244 sequenceNumber: 1,245 });246 // Now setup event repo so that writes always fail247 const writeEvent = sinon.fake.resolves(false);248 sinon.replace(eventRepository, 'writeEvent', writeEvent);249 // Note: setLibraryName has retries set to 3250 await t.throwsAsync(251 runCommand('setLibraryName', { libraryId, name: 'North' }),252 MaxCommandAttemptsError,253 'error thrown when we reach max retries trying to write event',254 );255 t.is(writeEvent.callCount, 4, 'writeEvent() called 4 times');256});257// A successful command should write events to our repository and generate the258// proper notifications.259test('successful command', async t => {260 const {261 runCommand,262 eventRepository,263 notificationHandler,264 libraryId,265 } = await setupTest();266 await t.notThrowsAsync(267 runCommand('createLibrary', { libraryId }),268 'able to run createLibrary',269 );...

Full Screen

Full Screen

cjs.js

Source:cjs.js Github

copy

Full Screen

...79function timeout(event, ms) {80 return guard(function (cont) {81 var channel = new Channel();82 var timeout = setTimeout(function () {83 channel.writeEvent(true).sync(function () {84 });85 }, ms);86 cont(null, choose([87 event.wrap(function (value, cont) {88 clearTimeout(timeout);89 cont(null, { value: value });90 }),91 channel.readEvent().wrap(function (value, cont) {92 cont(null, { timeout: true });93 })94 ]).wrapAbort(function () {95 clearTimeout(timeout);96 }));97 });...

Full Screen

Full Screen

common.js

Source:common.js Github

copy

Full Screen

1$(function () {2 var hubConnection = $.connection.hub;3 hubConnection.logging = true;4 hubConnection.connectionSlow(function () {5 common.writeEvent("connectionSlow");6 });7 hubConnection.disconnected(function () {8 common.writeEvent("disconnected");9 });10 hubConnection.error(function (error) {11 common.writeError("error: " + error);12 });13 hubConnection.reconnected(function () {14 common.writeEvent("reconnected");15 });16 hubConnection.reconnecting(function () {17 common.writeEvent("reconnecting");18 });19 hubConnection.starting(function () {20 common.writeEvent("starting");21 });22 hubConnection.stateChanged(function (change) {23 common.writeEvent("stateChanged: " + common.printState(change.oldState) + " => " + common.printState(change.newState));24 if (change.oldState === $.signalR.connectionState.connecting && change.newState === $.signalR.connectionState.connected) {25 common.writeLine("hubConnection.ajaxDataType: " + hubConnection.ajaxDataType);26 common.writeLine("hubConnection.disconnectTimeout: " + hubConnection.disconnectTimeout);27 common.writeLine("hubConnection.id: " + hubConnection.id);28 common.writeLine("hubConnection.logging: " + hubConnection.logging);29 common.writeLine("hubConnection.keepAliveData.activated: " + hubConnection.keepAliveData.activated);30 common.writeLine("hubConnection.keepAliveData.checkInterval: " + hubConnection.keepAliveData.checkInterval);31 common.writeLine("hubConnection.keepAliveData.lastKeepAlive: " + hubConnection.keepAliveData.lastKeepAlive);32 common.writeLine("hubConnection.keepAliveData.timeout: " + hubConnection.keepAliveData.timeout);33 common.writeLine("hubConnection.keepAliveData.timeoutWarning: " + hubConnection.keepAliveData.timeoutWarning);34 common.writeLine("hubConnection.keepAliveWarnAt: " + hubConnection.keepAliveWarnAt);35 common.writeLine("hubConnection.qs: " + hubConnection.qs);36 common.writeLine("hubConnection.reconnectDelay: " + hubConnection.reconnectDelay);37 common.writeLine("hubConnection.state: " + common.printState(hubConnection.state));...

Full Screen

Full Screen

mbitcontroller.js

Source:mbitcontroller.js Github

copy

Full Screen

...22 });23 microbit_ = microbit;24 25 //Off all LEDs26 microbit.writeEvent(19, 8888, function() {});27 microbit.writeEvent(23, 8888, function() {});28 microbit.writeEvent(28, 8888, function() {}); 29 });30});31const requestHandler = (request, response) => { 32 console.log(request.url)33 34 if(request.url.indexOf("red") !== -1){35 console.log("Red");36 //Off all LEDs37 microbit_.writeEvent(19, 8888, function() {});38 microbit_.writeEvent(23, 8888, function() {});39 microbit_.writeEvent(28, 8888, function() {});40 41 //Red 42 microbit_.writeEvent(23, 8888, function() {});43 microbit_.writeEvent(21, 8888, function() {});44 microbit_.writeEvent(18, 8888, function() {});45 }46 47 if(request.url.indexOf("green") !== -1){48 console.log("Green");49 //Off all LEDs50 microbit_.writeEvent(19, 8888, function() {});51 microbit_.writeEvent(23, 8888, function() {});52 microbit_.writeEvent(28, 8888, function() {});53 //Green 54 microbit_.writeEvent(19, 8888, function() {});55 microbit_.writeEvent(23, 8888, function() {});56 microbit_.writeEvent(20, 8888, function() {});57 58 }59 60 if(request.url.indexOf("blue") !== -1){61 console.log("Blue");62 //Off all LEDs63 microbit_.writeEvent(19, 8888, function() {});64 microbit_.writeEvent(23, 8888, function() {});65 microbit_.writeEvent(28, 8888, function() {});66 //Blue 67 microbit_.writeEvent(19, 8888, function() {});68 microbit_.writeEvent(21, 8888, function() {});69 microbit_.writeEvent(22, 8888, function() {});70 71 }72 response.end('Alexa m:bit Controller')73}74const server = http.createServer(requestHandler)75server.listen(port, (err) => { 76 if (err) {77 return console.log('Error: something bad happened', err)78 }79 console.log('Alexa m:bit Controller is listening on port ' + port);...

Full Screen

Full Screen

Log.js

Source:Log.js Github

copy

Full Screen

...41// Set router tags.42//43router.tag( 'testLog' );44/**45 * Test Log.writeEvent()46 *47 * The service will test the Log.writeEvent() method.48 *49 * @path /writeEvent50 * @verb get51 * @response {Object} The operation result.52 */53router.get(54 '/writeEvent',55 (request, response) =>56 {57 const test_module = require( '../../utils/Log' );58 const result = test_module.writeEvent( stamp, Date.now(), request, response );59 response.send({ result : result });60 },61 'writeEvent'62)63 .response(64 200,65 [ 'application/json' ],66 "Log.writeEvent() result"67 )68 .summary(69 "Test Log.writeEvent()"70 )71 .description(dd`72 The service will test the Log.writeEvent() method....

Full Screen

Full Screen

fullJsonStreamReporter.js

Source:fullJsonStreamReporter.js Github

copy

Full Screen

...21module.exports = class FullJsonStreamReporter extends BaseRunner {22 constructor(runner, options) {23 super(runner, options);24 const total = runner.total;25 runner.once(EVENT_RUN_BEGIN, () => writeEvent(['start', { total }]));26 runner.once(EVENT_RUN_END, () => writeEvent(['end', this.stats]));27 runner.on(EVENT_TEST_BEGIN, test => writeEvent(['testStart', clean(test)]));28 runner.on(EVENT_TEST_PASS, test => writeEvent(['pass', clean(test)]));29 runner.on(EVENT_TEST_FAIL, (test, err) => {30 test = clean(test);31 test.actual = err.actual;32 test.expected = err.expected;33 test.actualJSON = err.actualJSON;34 test.expectedJSON = err.expectedJSON;35 test.err = err.message;36 test.stack = err.stack || null;37 writeEvent(['fail', test]);38 });39 }40}41function writeEvent(event) {42 process.stdout.write(JSON.stringify(event) + '\n');43}44const clean = test => ({45 title: test.title,46 fullTitle: test.fullTitle(),47 duration: test.duration,48 currentRetry: test.currentRetry()...

Full Screen

Full Screen

json-mocha-reporter.js

Source:json-mocha-reporter.js Github

copy

Full Screen

...11function JSONExtra(runner, options) {12 mocha.reporters.Base.call(this, runner, options);13 const self = this;14 runner.once(constants.EVENT_RUN_BEGIN, function () {15 writeEvent(['start', { total: runner.total }]);16 });17 runner.on(constants.EVENT_TEST_PASS, function (test) {18 writeEvent(['pass', clean(test)]);19 });20 runner.on(constants.EVENT_TEST_FAIL, function (test, err) {21 test = clean(test);22 test.err = err.message;23 test.stack = err.stack || null;24 writeEvent(['fail', test]);25 });26 runner.once(constants.EVENT_RUN_END, function () {27 writeEvent(['end', self.stats]);28 });29 runner.on(constants.EVENT_TEST_BEGIN, function (test) {30 writeEvent(['test-start', clean(test)]);31 });32 runner.on(constants.EVENT_TEST_PENDING, function (test) {33 writeEvent(['pending', clean(test)]);34 });35}36function writeEvent(event) {37 process.stdout.write(JSON.stringify(event) + '\n');38}39/**40 * Returns an object literal representation of `test`41 * free of cyclic properties, etc.42 *43 * @private44 * @param {Object} test - Instance used as data source.45 * @return {Object} object containing pared-down test instance data46 */47function clean(test) {48 return {49 title: test.title,50 fullTitle: test.fullTitle(),...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var mochaTest = new MochaTest();2mochaTest.writeEvent("test event");3mochaTest.writeEvent("test event 2");4mochaTest.writeEvent("test event 3");5mochaTest.writeEvent("test event 4");6mochaTest.writeEvent("test event 5");7var mochaTest = new MochaTest();8mochaTest.writeEvent("test event");9mochaTest.writeEvent("test event 2");10mochaTest.writeEvent("test event 3");11mochaTest.writeEvent("test event 4");12mochaTest.writeEvent("test event 5");13var mochaTest = new MochaTest();14mochaTest.writeEvent("test event");15mochaTest.writeEvent("test event 2");16mochaTest.writeEvent("test event 3");17mochaTest.writeEvent("test event 4");18mochaTest.writeEvent("test event 5");19var mochaTest = new MochaTest();20mochaTest.writeEvent("test event");21mochaTest.writeEvent("test event 2");22mochaTest.writeEvent("test event 3");23mochaTest.writeEvent("test event 4");24mochaTest.writeEvent("test event 5");25var mochaTest = new MochaTest();26mochaTest.writeEvent("test event");27mochaTest.writeEvent("test event 2");28mochaTest.writeEvent("test event 3");29mochaTest.writeEvent("test event 4");30mochaTest.writeEvent("test event 5");31var mochaTest = new MochaTest();32mochaTest.writeEvent("test event");33mochaTest.writeEvent("test event 2");34mochaTest.writeEvent("test event 3");35mochaTest.writeEvent("test event 4");36mochaTest.writeEvent("test event 5");

Full Screen

Using AI Code Generation

copy

Full Screen

1var Mocha = require('./mocha.js');2var mocha = new Mocha();3mocha.writeEvent('This is a test event');4var Mocha = require('./mocha.js');5var mocha = new Mocha();6mocha.readEvent();7var Mocha = require('./mocha.js');8var mocha = new Mocha();9mocha.deleteEvent();

Full Screen

Using AI Code Generation

copy

Full Screen

1mochaReporter.writeEvent('test', {2 err: {3 }4})5mochaReporter.writeEvent('suite', {6})7mochaReporter.writeEvent('mocha', {8})

Full Screen

Using AI Code Generation

copy

Full Screen

1var MochaReporter = require('mocha-reporter');2MochaReporter.writeEvent('myEvent', 'myData');3var MochaReporter = require('mocha-reporter');4MochaReporter.writeEvent('myEvent', 'myData');5var MochaReporter = require('mocha-reporter');6MochaReporter.writeEvent('myEvent', 'myData');7var MochaReporter = require('mocha-reporter');8MochaReporter.writeEvent('myEvent', 'myData');9var MochaReporter = require('mocha-reporter');10MochaReporter.writeEvent('myEvent', 'myData');11var MochaReporter = require('mocha-reporter');12MochaReporter.writeEvent('myEvent', 'myData');13var MochaReporter = require('mocha-reporter');14MochaReporter.writeEvent('myEvent', 'myData');15var MochaReporter = require('mocha-reporter');16MochaReporter.writeEvent('myEvent', 'myData');17var MochaReporter = require('mocha-reporter');18MochaReporter.writeEvent('myEvent', 'myData');19var MochaReporter = require('mocha-reporter');20MochaReporter.writeEvent('myEvent', 'myData');

Full Screen

Using AI Code Generation

copy

Full Screen

1var MochaReporter = require('mocha-reporter').MochaReporter;2var mochaReporter = new MochaReporter();3describe('test', function() {4 it('test1', function() {5 mochaReporter.writeEvent('testStarted', 'test.js', 'test1');6 mochaReporter.writeEvent('testFinished', 'test.js', 'test1');7 });8 it('test2', function() {9 mochaReporter.writeEvent('testStarted', 'test.js', 'test2');10 mochaReporter.writeEvent('testFinished', 'test.js', 'test2');11 });12});13var MochaReporter = require('mocha-reporter').MochaReporter;14var mochaReporter = new MochaReporter();15describe('test', function() {16 it('test1', function() {17 mochaReporter.writeEvent('testStarted', 'test.js', 'test1');18 mochaReporter.writeEvent('testFinished', 'test.js', 'test1');19 });20 it('test2', function() {21 mochaReporter.writeEvent('testStarted', 'test.js', 'test2');22 mochaReporter.writeEvent('testFinished', 'test.js', 'test2');23 });24});25describe('test2', function() {26 it('test2_1', function() {27 mochaReporter.writeEvent('testStarted', 'test2.js', 'test2_1');28 mochaReporter.writeEvent('testFinished', 'test2.js', 'test2_1');29 });30 it('test2_2', function() {31 mochaReporter.writeEvent('testStarted', '

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Mocha automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful