mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Pretty-print trace messages
This commit is contained in:
parent
e748d543e9
commit
9a31aa0362
4 changed files with 5 additions and 5 deletions
|
@ -620,7 +620,7 @@ impl SpircTask {
|
|||
}
|
||||
|
||||
fn handle_user_attributes_update(&mut self, update: UserAttributesUpdate) {
|
||||
trace!("Received attributes update: {:?}", update);
|
||||
trace!("Received attributes update: {:#?}", update);
|
||||
let attributes: UserAttributes = update
|
||||
.get_pairs()
|
||||
.iter()
|
||||
|
|
|
@ -279,7 +279,7 @@ impl Session {
|
|||
}
|
||||
}
|
||||
|
||||
trace!("Received product info: {:?}", user_attributes);
|
||||
trace!("Received product info: {:#?}", user_attributes);
|
||||
Self::check_catalogue(&user_attributes);
|
||||
|
||||
self.0.data.write().unwrap().user_data.attributes = user_attributes;
|
||||
|
@ -291,7 +291,7 @@ impl Session {
|
|||
| Some(LicenseVersion) => {}
|
||||
_ => {
|
||||
if let Some(packet_type) = PacketType::from_u8(cmd) {
|
||||
trace!("Ignoring {:?} packet with data {:?}", packet_type, data);
|
||||
trace!("Ignoring {:?} packet with data {:#?}", packet_type, data);
|
||||
} else {
|
||||
trace!("Ignoring unknown packet {:x}", cmd);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ impl TokenProvider {
|
|||
.expect("No tokens received")
|
||||
.to_vec();
|
||||
let token = Token::new(String::from_utf8(data).unwrap()).map_err(|_| MercuryError)?;
|
||||
trace!("Got token: {:?}", token);
|
||||
trace!("Got token: {:#?}", token);
|
||||
self.lock(|inner| inner.tokens.push(token.clone()));
|
||||
Ok(token)
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ pub trait Metadata: Send + Sized + 'static {
|
|||
async fn get(session: &Session, id: SpotifyId) -> Result<Self, MetadataError> {
|
||||
let response = Self::request(session, id).await?;
|
||||
let msg = Self::Message::parse_from_bytes(&response)?;
|
||||
trace!("Received metadata: {:?}", msg);
|
||||
trace!("Received metadata: {:#?}", msg);
|
||||
Self::parse(&msg, id)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue