mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	protocol-native: improve logging
Add an end marker in the log for the message. Log the output messages with the right log topic.
This commit is contained in:
		
							parent
							
								
									855bebf0ea
								
							
						
					
					
						commit
						f0328a1f8d
					
				
					 2 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -228,6 +228,9 @@ static void debug_msg(const char *prefix, const struct pw_protocol_native_messag
 | 
			
		|||
		hex = true;
 | 
			
		||||
	if (hex)
 | 
			
		||||
		spa_debug_mem(0, msg->data, msg->size);
 | 
			
		||||
 | 
			
		||||
	pw_logt_debug(mod_topic_connection, "%s ****", prefix);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void pre_demarshal(struct pw_protocol_native_connection *conn,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -728,9 +728,12 @@ pw_protocol_native_connection_end(struct pw_protocol_native_connection *conn,
 | 
			
		|||
		buf->n_fds = buf->msg.n_fds;
 | 
			
		||||
 | 
			
		||||
	if (mod_topic_connection->level >= SPA_LOG_LEVEL_DEBUG) {
 | 
			
		||||
		pw_log_debug(">>>>>>>>> out: id:%d op:%d size:%d seq:%d",
 | 
			
		||||
		pw_logt_debug(mod_topic_connection,
 | 
			
		||||
			">>>>>>>>> out: id:%d op:%d size:%d seq:%d",
 | 
			
		||||
				buf->msg.id, buf->msg.opcode, size, buf->msg.seq);
 | 
			
		||||
	        spa_debug_pod(0, NULL, SPA_PTROFF(p, impl->hdr_size, struct spa_pod));
 | 
			
		||||
		pw_logt_debug(mod_topic_connection,
 | 
			
		||||
			">>>>>>>>> out: done");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	buf->seq = (buf->seq + 1) & SPA_ASYNC_SEQ_MASK;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue