mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
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:
parent
741982b984
commit
90dd7e5e1b
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user