mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-06 13:30:41 +02:00
adds CRITICAL log level
This commit is contained in:
parent
7b7ef0eb97
commit
9d36f99404
@ -23,7 +23,7 @@ input.instantUpdate {
|
|||||||
.warningToast {
|
.warningToast {
|
||||||
background-color: rgba(255, 181, 44, 0.603) !important;
|
background-color: rgba(255, 181, 44, 0.603) !important;
|
||||||
}
|
}
|
||||||
.errorToast, .exceptionToast {
|
.errorToast, .criticalToast {
|
||||||
background-color: rgba(216, 41, 18, 0.678) !important;
|
background-color: rgba(216, 41, 18, 0.678) !important;
|
||||||
}
|
}
|
||||||
.buttonComponent {
|
.buttonComponent {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { ToastContainer, Toast } from 'react-bootstrap';
|
import { ToastContainer, Toast } from 'react-bootstrap';
|
||||||
|
|
||||||
export type LevelName = 'ERROR' | 'WARNING' | 'INFO' | 'DEBUG';
|
export type LevelName = 'CRITICAL' | 'ERROR' | 'WARNING' | 'INFO' | 'DEBUG';
|
||||||
export type Notification = {
|
export type Notification = {
|
||||||
id: number;
|
id: number;
|
||||||
timeStamp: string;
|
timeStamp: string;
|
||||||
@ -24,6 +24,7 @@ export const Notifications = React.memo((props: NotificationProps) => {
|
|||||||
// Determine if the toast should be shown
|
// Determine if the toast should be shown
|
||||||
const shouldShow =
|
const shouldShow =
|
||||||
notification.levelname === 'ERROR' ||
|
notification.levelname === 'ERROR' ||
|
||||||
|
notification.levelname === 'CRITICAL' ||
|
||||||
(showNotification &&
|
(showNotification &&
|
||||||
['WARNING', 'INFO', 'DEBUG'].includes(notification.levelname));
|
['WARNING', 'INFO', 'DEBUG'].includes(notification.levelname));
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class DefaultFormatter(uvicorn.logging.ColourizedFormatter):
|
|||||||
|
|
||||||
class SocketIOHandler(logging.Handler):
|
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
|
server, allowing for real-time logging in applications that use Socket.IO for
|
||||||
communication.
|
communication.
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user