Skip to content

Commit

Permalink
fix: open the log history automatically if we have error or fatal
Browse files Browse the repository at this point in the history
close #2755
  • Loading branch information
hamed-musallam committed Nov 21, 2023
1 parent 1a32500 commit 5c7629e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/component/context/LoggerContext.tsx
Expand Up @@ -47,8 +47,8 @@ export function LoggerProvider({ children }: LoggerProviderProps) {
const loggerRef = useRef<FifoLogger>(
new FifoLogger({
onChange: (log, logs) => {
if (log && ['warn', 'error', 'fatal'].includes(log.levelLabel)) {
//open the log history automatically if we have warn,error, or fatal
if (log && ['error', 'fatal'].includes(log.levelLabel)) {
//open the log history automatically if we have error or fatal
openLogHistory(true);

if (log?.error) {
Expand Down

0 comments on commit 5c7629e

Please sign in to comment.