How to use the appcenter/appcenter-log.error function in appcenter

To help you get started, we’ve selected a few appcenter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / appcenter-sdk-react-native / appcenter / AppCenter.js View on Github external
this[key] = { type, value };
                    break;

                case 'object':
                    if (value instanceof Date) {
                        this[key] = { type: 'date-time', value: value.getTime() };
                    } else {
                        AppCenterLog.error(logTag, 'CustomProperties: Invalid value type, expected string|number|boolean|Date.');
                    }
                    break;

                default:
                    AppCenterLog.error(logTag, 'CustomProperties: Invalid value type, expected string|number|boolean|Date.');
            }
        } else {
            AppCenterLog.error(logTag, 'CustomProperties: Invalid key type, expected string.');
        }
        return this;
    }
github microsoft / appcenter-sdk-react-native / appcenter-crashes / Crashes.js View on Github external
            .catch((error) => AppCenterLog.error(LOG_TAG, `Could not send error attachments. Error: ${error}`));
        });
github microsoft / appcenter-sdk-react-native / appcenter-crashes / Crashes.js View on Github external
notifyUserConfirmation(userConfirmation) {
        switch (userConfirmation) {
            case UserConfirmation.DONT_SEND:
            case UserConfirmation.SEND:
            case UserConfirmation.ALWAYS_SEND:
                AppCenterReactNativeCrashes.notifyWithUserConfirmation(userConfirmation);
                break;

            default:
                AppCenterLog.error(LOG_TAG, 'Crashes.notifyUserConfirmation: Invalid parameter value.');
                return;
        }
        if (userConfirmation !== UserConfirmation.DONT_SEND) {
            Helper.sendErrorAttachments();
        }
    },
github microsoft / appcenter-sdk-react-native / appcenter / AppCenter.js View on Github external
clear(key) {
        if (typeof key === 'string') {
            this[key] = { type: 'clear' };
        } else {
            AppCenterLog.error(logTag, 'CustomProperties: Invalid key type, expected string.');
        }
        return this;
    }
};
github microsoft / appcenter-sdk-react-native / appcenter / AppCenter.js View on Github external
case 'string':
                case 'number':
                case 'boolean':
                    this[key] = { type, value };
                    break;

                case 'object':
                    if (value instanceof Date) {
                        this[key] = { type: 'date-time', value: value.getTime() };
                    } else {
                        AppCenterLog.error(logTag, 'CustomProperties: Invalid value type, expected string|number|boolean|Date.');
                    }
                    break;

                default:
                    AppCenterLog.error(logTag, 'CustomProperties: Invalid value type, expected string|number|boolean|Date.');
            }
        } else {
            AppCenterLog.error(logTag, 'CustomProperties: Invalid key type, expected string.');
        }
        return this;
    }
github microsoft / appcenter-sdk-react-native / appcenter / AppCenter.js View on Github external
setCustomProperties(properties) {
        if (properties instanceof AppCenter.CustomProperties) {
            return AppCenterReactNative.setCustomProperties(properties);
        }
        const type = Object.prototype.toString.apply(properties);
        AppCenterLog.error(logTag, `SetCustomProperties: Invalid type, expected CustomProperties but got ${type}.`);
        return Promise.resolve(null);
    },