mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Don't print messages from workers to the console twice
Previously, any message logged to the console within a worker with a log level greater than trace was printed twice.
This commit is contained in:
parent
598fabbdd3
commit
d0008ae5e0
Notes:
github-actions[bot]
2024-10-07 19:23:04 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d0008ae5e01 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1665
1 changed files with 0 additions and 23 deletions
|
@ -62,29 +62,6 @@ JS::ThrowCompletionOr<JS::Value> WorkerDebugConsoleClient::printer(JS::Console::
|
|||
|
||||
auto output = TRY(generically_format_values(arguments.get<JS::MarkedVector<JS::Value>>()));
|
||||
m_console->output_debug_message(log_level, output);
|
||||
|
||||
switch (log_level) {
|
||||
case JS::Console::LogLevel::Debug:
|
||||
dbgln("{}\033[36;1m{}\033[0m", indent, output);
|
||||
break;
|
||||
case JS::Console::LogLevel::Error:
|
||||
case JS::Console::LogLevel::Assert:
|
||||
dbgln("{}\033[31;1m{}\033[0m", indent, output);
|
||||
break;
|
||||
case JS::Console::LogLevel::Info:
|
||||
dbgln("{}(i) {}", indent, output);
|
||||
break;
|
||||
case JS::Console::LogLevel::Log:
|
||||
dbgln("{}{}", indent, output);
|
||||
break;
|
||||
case JS::Console::LogLevel::Warn:
|
||||
case JS::Console::LogLevel::CountReset:
|
||||
dbgln("{}\033[33;1m{}\033[0m", indent, output);
|
||||
break;
|
||||
default:
|
||||
dbgln("{}{}", indent, output);
|
||||
break;
|
||||
}
|
||||
return JS::js_undefined();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue