Bug 1874215 - Don't set the Rust max log level r=markh

Increasing the level to DEBUG is causing slowdowns for the necko code
and it doesn't seem like we're actually getting the Rust records into
the sync logs anyways.

Differential Revision: https://phabricator.services.mozilla.com/D199259
This commit is contained in:
Ben Dean-Kawamura 2024-01-23 16:30:44 +00:00
parent 741982b984
commit 90dd7e5e1b

View File

@ -11,13 +11,11 @@ extern crate cstr;
extern crate xpcom;
use golden_gate::log::LogSink;
use log;
use nserror::{nsresult, NS_OK};
use nsstring::nsAString;
use once_cell::sync::Lazy;
use std::os::raw::c_char;
use std::{
cmp,
collections::HashMap,
sync::{
atomic::{AtomicBool, Ordering},
@ -46,11 +44,6 @@ impl AppServicesLogger {
xpcom_method!(register => Register(target: *const nsAString, logger: *const mozIServicesLogSink));
fn register(&self, target: &nsAString, logger: &mozIServicesLogSink) -> Result<(), nsresult> {
let log_sink_logger = LogSink::with_logger(Some(logger))?;
let max_level = cmp::max(log::max_level(), log_sink_logger.max_level);
// Note: This will only work if the max_level is lower than the compile-time
// max_level_* filter.
log::set_max_level(max_level);
ensure_observing_shutdown();