mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 16:55:08 +02:00
use tracing in actix-http
This commit is contained in:
@ -2,6 +2,7 @@ use actix_codec::{Decoder, Encoder};
|
||||
use bitflags::bitflags;
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use bytestring::ByteString;
|
||||
use tracing::error;
|
||||
|
||||
use super::{
|
||||
frame::Parser,
|
||||
@ -253,7 +254,7 @@ impl Decoder for Codec {
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
log::error!("Unfinished fragment {:?}", opcode);
|
||||
error!("Unfinished fragment {:?}", opcode);
|
||||
Err(ProtocolError::ContinuationFragment(opcode))
|
||||
}
|
||||
};
|
||||
|
@ -73,8 +73,8 @@ mod inner {
|
||||
use actix_service::{IntoService, Service};
|
||||
use futures_core::stream::Stream;
|
||||
use local_channel::mpsc;
|
||||
use log::debug;
|
||||
use pin_project_lite::pin_project;
|
||||
use tracing::debug;
|
||||
|
||||
use actix_codec::{AsyncRead, AsyncWrite, Decoder, Encoder, Framed};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::convert::TryFrom;
|
||||
|
||||
use bytes::{Buf, BufMut, BytesMut};
|
||||
use log::debug;
|
||||
use tracing::debug;
|
||||
|
||||
use super::{
|
||||
mask::apply_mask,
|
||||
|
@ -3,6 +3,8 @@ use std::{
|
||||
fmt,
|
||||
};
|
||||
|
||||
use tracing::error;
|
||||
|
||||
/// Operation codes defined in [RFC 6455 §11.8].
|
||||
///
|
||||
/// [RFC 6455]: https://datatracker.ietf.org/doc/html/rfc6455#section-11.8
|
||||
@ -58,7 +60,7 @@ impl From<OpCode> for u8 {
|
||||
Ping => 9,
|
||||
Pong => 10,
|
||||
Bad => {
|
||||
log::error!("Attempted to convert invalid opcode to u8. This is a bug.");
|
||||
error!("Attempted to convert invalid opcode to u8. This is a bug.");
|
||||
8 // if this somehow happens, a close frame will help us tear down quickly
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user