mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-23 13:45:33 +02:00
🚸 Adds user-facing warning logging
This commit is contained in:
parent
0927ea879b
commit
6e0cda8709
@ -28,7 +28,7 @@ export const statusMsg = (title, msg) => {
|
|||||||
/* Prints status message, with a stack trace */
|
/* Prints status message, with a stack trace */
|
||||||
export const statusErrorMsg = (title, msg, errorLog) => {
|
export const statusErrorMsg = (title, msg, errorLog) => {
|
||||||
console.log(
|
console.log(
|
||||||
`%c${title || ''}\n%c${msg} \n%c${errorLog}`,
|
`%c${title || ''}\n%c${msg} \n%c${errorLog || ''}`,
|
||||||
'font-weight: bold; color: #0dd8d8; text-decoration: underline;',
|
'font-weight: bold; color: #0dd8d8; text-decoration: underline;',
|
||||||
'color: #ff025a',
|
'color: #ff025a',
|
||||||
'color: #ff025a80;',
|
'color: #ff025a80;',
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as Sentry from '@sentry/vue';
|
import * as Sentry from '@sentry/vue';
|
||||||
import { warningMsg, statusMsg } from '@/utils/CoolConsole';
|
import { warningMsg, statusMsg, statusErrorMsg } from '@/utils/CoolConsole';
|
||||||
import { sessionStorageKeys } from '@/utils/defaults';
|
import { sessionStorageKeys } from '@/utils/defaults';
|
||||||
|
|
||||||
/* Makes the current time, like hh:mm:ss */
|
/* Makes the current time, like hh:mm:ss */
|
||||||
@ -33,4 +33,9 @@ export const InfoHandler = (msg, title) => {
|
|||||||
statusMsg(title || 'Info', msg);
|
statusMsg(title || 'Info', msg);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Outputs warnings caused by the user, such as missing field */
|
||||||
|
export const WarningInfoHandler = (msg, title, log) => {
|
||||||
|
statusErrorMsg(title || 'Warning', msg, log);
|
||||||
|
};
|
||||||
|
|
||||||
export default ErrorHandler;
|
export default ErrorHandler;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user