mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
constellation: clean up logging of pipelines and browsing contexts (#30657)
* constellation: clean up logging of pipelines and browsing contexts * bring back sentence case; remove commented code * fix more typos and wordings
This commit is contained in:
parent
e620381736
commit
098e6a1580
7 changed files with 190 additions and 316 deletions
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@ use std::thread;
|
|||
use backtrace::Backtrace;
|
||||
use compositing_traits::ConstellationMsg as FromCompositorMsg;
|
||||
use crossbeam_channel::Sender;
|
||||
use log::{debug, Level, LevelFilter, Log, Metadata, Record};
|
||||
use log::{Level, LevelFilter, Log, Metadata, Record};
|
||||
use msg::constellation_msg::TopLevelBrowsingContextId;
|
||||
use script_traits::{LogEntry, ScriptMsg as FromScriptMsg, ScriptToConstellationChan};
|
||||
use servo_remutex::ReentrantMutex;
|
||||
|
@ -53,7 +53,6 @@ impl Log for FromScriptLogger {
|
|||
|
||||
fn log(&self, record: &Record) {
|
||||
if let Some(entry) = log_entry(record) {
|
||||
debug!("Sending log entry {:?}.", entry);
|
||||
let thread_name = thread::current().name().map(ToOwned::to_owned);
|
||||
let msg = FromScriptMsg::LogEntry(thread_name, entry);
|
||||
let chan = self
|
||||
|
@ -95,7 +94,6 @@ impl Log for FromCompositorLogger {
|
|||
|
||||
fn log(&self, record: &Record) {
|
||||
if let Some(entry) = log_entry(record) {
|
||||
debug!("Sending log entry {:?}.", entry);
|
||||
let top_level_id = TopLevelBrowsingContextId::installed();
|
||||
let thread_name = thread::current().name().map(ToOwned::to_owned);
|
||||
let msg = FromCompositorMsg::LogEntry(top_level_id, thread_name, entry);
|
||||
|
|
|
@ -165,7 +165,7 @@ impl NetworkListener {
|
|||
if self.should_send {
|
||||
if let Err(e) = self.sender.send((self.pipeline_id, msg)) {
|
||||
warn!(
|
||||
"Failed to forward network message to pipeline {}: {:?}",
|
||||
"Failed to forward network message to pipeline {:?}: {:?}",
|
||||
self.pipeline_id, e
|
||||
);
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ impl JointSessionHistory {
|
|||
}
|
||||
|
||||
pub fn remove_entries_for_browsing_context(&mut self, context_id: BrowsingContextId) {
|
||||
debug!("removing entries for context {}", context_id);
|
||||
debug!("{}: Removing entries for browsing context", context_id);
|
||||
self.past.retain(|diff| match diff {
|
||||
SessionHistoryDiff::BrowsingContextDiff {
|
||||
browsing_context_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue