Просмотр исходного кода

ircd: write proper messages in info! output

ghassmo 4 лет назад
Родитель
Сommit
a59b4786d9
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      bin/ircd/src/main.rs
  2. 1 1
      bin/ircd/src/server.rs

+ 2 - 2
bin/ircd/src/main.rs

@@ -71,7 +71,7 @@ async fn broadcast_msg(
     peer_addr: SocketAddr,
     conn: &mut IrcServerConnection,
 ) -> Result<()> {
-    info!("Send msg to IRC server '{}' from {}", irc_msg, peer_addr);
+    info!("Send msg to IRC client '{}' from {}", irc_msg, peer_addr);
 
     if let Err(e) = conn.update(irc_msg).await {
         warn!("Connection error: {} for {}", e, peer_addr);
@@ -137,7 +137,7 @@ async fn process(
                     warn!("Read line error. Closing stream for {}: {}", peer_addr, e);
                     return Ok(())
                 }
-                info!("Received msg from ircd: {:?}", line);
+                info!("Received msg from IRC client: {:?}", line);
                 let irc_msg = match clean_input(line, &peer_addr) {
                     Ok(m) => m,
                     Err(e) => return Err(e)

+ 1 - 1
bin/ircd/src/server.rs

@@ -52,7 +52,7 @@ impl IrcServerConnection {
         // that for now to keep the protocol simple and focused.
         let command = tokens.next().ok_or(Error::MalformedPacket)?;
 
-        info!("Received command: {}", command.to_uppercase());
+        info!("IRC server received command: {}", command.to_uppercase());
 
         match command.to_uppercase().as_str() {
             "USER" => {