From 0da42c555943fde2c8623555ca4396a0bbf9ae3e Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Tue, 29 Sep 2015 15:55:19 -0700
Subject: PLT-345 adding client side logging

---
 web/react/utils/client.jsx | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'web/react/utils/client.jsx')

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',
-- 
cgit v1.2.3-1-g7c22

