Cleaned up excessive logging at client, paring down to errors mostly and critical info

This commit is contained in:
2021-09-26 21:19:21 +00:00
parent d834e9a1a0
commit 51eddfede9
6 changed files with 13 additions and 83 deletions

View File

@@ -59,11 +59,14 @@ export function processLogin(authResponse, loggedInWithKnownPassword) {
tfaEnabled: authResponse.tfa,
customerRights: authResponse.customerRights
});
//log the login
window.$gz.store.commit(
"logItem",
"auth::processLogin -> User " + token.id + " logged in"
);
//decided to remove this as it is not an out of the ordinary scenario to log
// however left this block here in case in future becomes necessary for some common issue
// //log the login
// window.$gz.store.commit(
// "logItem",
// "auth::processLogin -> User " + token.id + " logged in"
// );
//Get global settings
let gsets = await window.$gz.api.get("global-biz-setting/client");
@@ -71,10 +74,6 @@ export function processLogin(authResponse, loggedInWithKnownPassword) {
//In a form this would trigger a bunch of validation or error display code but for here and now:
//convert error to human readable string for display and popup a notification to user
let msg = window.$gz.api.apiErrorToHumanString(gsets.error);
window.$gz.store.commit(
"logItem",
"Initialize::() fetch global-biz-setting/client -> error" + msg
);
window.$gz.eventBus.$emit("notify-error", msg);
} else {
//Check if overrides and use them here
@@ -95,12 +94,6 @@ export function processLogin(authResponse, loggedInWithKnownPassword) {
export function processLogout() {
notifypoll.stopPolling();
if (window.$gz.store.state.authenticated) {
window.$gz.store.commit(
"logItem",
"auth::processLogout -> User logged out"
);
}
window.$gz.store.commit("logout");
sessionStorage.clear(); //clear all temporary session storage data
}