implement basic logger, replace console.log statements with logger methods

This commit is contained in:
Alex Holliday committed 2024-08-19 14:20:55 -07:00
1 parent 78e0f41f5a
commit 5c561d87ce
16 files changed
+57 -27

No files matched your search

+2 -1
View File
@@ -18,6 +18,7 @@ import {
import "./index.css";
import MonitorDetails60MinChart from "../../../Components/Charts/MonitorDetails60MinChart";
import Breadcrumbs from "../../../Components/Breadcrumbs";
import { logger } from "../../../Utils/Logger";
const StatBox = ({ title, value }) => {
return (
@@ -131,7 +132,7 @@ const DetailsPage = () => {
);
setMonitor(res.data.data);
} catch (error) {
console.error("Error fetching monitor of id: " + monitorId);
logger.error(error);
navigate("/not-found");
}
}, [authToken, monitorId, navigate, dateRange]);