adds CRITICAL log level

This commit is contained in:
Mose Müller 2023-11-27 16:15:53 +01:00
parent 7b7ef0eb97
commit 9d36f99404
3 changed files with 4 additions and 3 deletions

View File

@ -23,7 +23,7 @@ input.instantUpdate {
.warningToast {
background-color: rgba(255, 181, 44, 0.603) !important;
}
.errorToast, .exceptionToast {
.errorToast, .criticalToast {
background-color: rgba(216, 41, 18, 0.678) !important;
}
.buttonComponent {

View File

@ -1,7 +1,7 @@
import React from 'react';
import { ToastContainer, Toast } from 'react-bootstrap';
export type LevelName = 'ERROR' | 'WARNING' | 'INFO' | 'DEBUG';
export type LevelName = 'CRITICAL' | 'ERROR' | 'WARNING' | 'INFO' | 'DEBUG';
export type Notification = {
id: number;
timeStamp: string;
@ -24,6 +24,7 @@ export const Notifications = React.memo((props: NotificationProps) => {
// Determine if the toast should be shown
const shouldShow =
notification.levelname === 'ERROR' ||
notification.levelname === 'CRITICAL' ||
(showNotification &&
['WARNING', 'INFO', 'DEBUG'].includes(notification.levelname));

View File

@ -38,7 +38,7 @@ class DefaultFormatter(uvicorn.logging.ColourizedFormatter):
class SocketIOHandler(logging.Handler):
"""
Custom logging handler that emits ERROR and EXCEPTION log records to a Socket.IO
Custom logging handler that emits ERROR and CRITICAL log records to a Socket.IO
server, allowing for real-time logging in applications that use Socket.IO for
communication.
"""