summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-29 15:55:19 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-29 15:55:19 -0700
commit0da42c555943fde2c8623555ca4396a0bbf9ae3e (patch)
tree5532aac376daeef039d0d5ee81a0e41cd99d095d /web/react
parent5e9dccc464590ffe6e05041b76192bb6f12e30c6 (diff)
downloadchat-0da42c555943fde2c8623555ca4396a0bbf9ae3e.tar.gz
chat-0da42c555943fde2c8623555ca4396a0bbf9ae3e.tar.bz2
chat-0da42c555943fde2c8623555ca4396a0bbf9ae3e.zip
PLT-345 adding client side logging
Diffstat (limited to 'web/react')
-rw-r--r--web/react/utils/client.jsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 715e26197..b1be61fc7 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -332,6 +332,20 @@ export function saveConfig(config, success, error) {
});
}
+export function logClientError(msg) {
+ var l = {};
+ l.level = 'ERROR';
+ l.message = msg;
+
+ $.ajax({
+ url: '/api/v1/admin/log_client',
+ dataType: 'json',
+ contentType: 'application/json',
+ type: 'POST',
+ data: JSON.stringify(l)
+ });
+}
+
export function testEmail(config, success, error) {
$.ajax({
url: '/api/v1/admin/test_email',