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 -2
View File
@@ -14,7 +14,7 @@ import Logo from "../../assets/icons/bwu-icon.svg?react";
import Mail from "../../assets/icons/mail.svg?react";
import ArrowBackRoundedIcon from "@mui/icons-material/ArrowBackRounded";
import PropTypes from "prop-types";
import { logger } from "../../Utils/Logger";
import "./index.css";
/**
@@ -284,7 +284,7 @@ const Login = () => {
}
})
.catch((error) => {
console.log(error);
logger.error(error);
});
}, [authToken, navigate]);
+2 -2
View File
@@ -17,6 +17,7 @@ import Button from "../../../Components/Button";
import Field from "../../../Components/Inputs/Field";
import axiosInstance from "../../../Utils/axiosConfig";
import "../index.css";
import { logger } from "../../../Utils/Logger";
/**
* Displays the initial landing page.
@@ -401,10 +402,9 @@ const Register = ({ isAdmin }) => {
token,
});
const { role, email } = res.data.data;
console.log(role);
setForm({ ...form, email, role });
} catch (error) {
console.log(error);
logger.error(error);
}
}
};