Merged in feature/wrap-logging (pull request #2511)
Feature/wrap logging * feat: change all logging to go through our own logger function so that we can control log levels * move packages/trpc to using our own logger * merge Approved-by: Linus Flood
This commit is contained in:
@@ -3,6 +3,7 @@ import { createEvent } from "ics"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
|
||||
import { toast } from "@/components/TempDesignSystem/Toasts"
|
||||
import useLang from "@/hooks/useLang"
|
||||
@@ -25,7 +26,7 @@ export default function AddToCalendar({
|
||||
|
||||
createEvent(event, (error, value) => {
|
||||
if (error) {
|
||||
console.error("ICS Error:", error)
|
||||
logger.error("ICS Error:", error)
|
||||
toast.error(
|
||||
intl.formatMessage({
|
||||
defaultMessage: "Failed to add to calendar",
|
||||
@@ -45,7 +46,7 @@ export default function AddToCalendar({
|
||||
URL.revokeObjectURL(url)
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Download error:", error)
|
||||
logger.error("Download error:", error)
|
||||
toast.error(
|
||||
intl.formatMessage({
|
||||
defaultMessage: "Failed to add to calendar",
|
||||
|
||||
Reference in New Issue
Block a user