CEC-279 Add logger (#62)

* CEC-279 Add logger

* Error log 500 status requests
This commit is contained in:
John Wu
2021-06-24 10:17:34 -07:00
committed by GitHub
parent f4e4261d01
commit 8bb245a417
17 changed files with 159 additions and 100 deletions

View File

@@ -24,6 +24,7 @@ import { LocalDateTimeString } from "../../../utils/dates";
import { Roles, hasRole } from "../../../utils/roles";
import TableHeaderSortable from "../../Table/HeaderSortable";
import SearchField from "../../Controls/SearchField";
import { logger } from "../../../services/monitoring";
const tableColumns = [
{
@@ -67,7 +68,7 @@ const UpdatePackagesList = () => {
useEffect(() => {
setTitle("Deploy Packages");
// eslint-disable-next-line
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
useEffect(() => {
@@ -80,7 +81,7 @@ const UpdatePackagesList = () => {
},
token
);
// eslint-disable-next-line
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [pageIndex, pageSize, token, orderBy, order, search]);
const handleChangePageIndex = (event, newIndex) => {
@@ -114,6 +115,7 @@ const UpdatePackagesList = () => {
await deletePackage(parseInt(package_id), token);
} catch (e) {
setMessage(e.message);
logger.warn(e.stack);
}
};