mirror of
https://github.com/nostrlabs-io/notepush.git
synced 2025-06-17 04:08:50 +00:00
Improve logging verbosity
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@ -102,7 +102,8 @@ impl RelayConnection {
|
|||||||
) -> Result<RelayMessage, Box<dyn std::error::Error>> {
|
) -> Result<RelayMessage, Box<dyn std::error::Error>> {
|
||||||
match message {
|
match message {
|
||||||
ClientMessage::Event(event) => {
|
ClientMessage::Event(event) => {
|
||||||
log::info!("Received event: {:?}", event);
|
log::info!("Received event with id: {:?}", event.id.to_hex());
|
||||||
|
log::debug!("Event received: {:?}", event);
|
||||||
self.notification_manager.send_notifications_if_needed(&event).await?;
|
self.notification_manager.send_notifications_if_needed(&event).await?;
|
||||||
let notice_message = format!("blocked: This relay does not store events");
|
let notice_message = format!("blocked: This relay does not store events");
|
||||||
let response = RelayMessage::Ok {
|
let response = RelayMessage::Ok {
|
||||||
@ -113,8 +114,9 @@ impl RelayConnection {
|
|||||||
Ok(response)
|
Ok(response)
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
log::info!("Received unsupported message: {:?}", message);
|
log::info!("Received unsupported Nostr client message");
|
||||||
let notice_message = format!("Unsupported message: {:?}", message);
|
log::debug!("Unsupported Nostr client message: {:?}", message);
|
||||||
|
let notice_message = format!("Unsupported message.");
|
||||||
let response = RelayMessage::Notice {
|
let response = RelayMessage::Notice {
|
||||||
message: notice_message,
|
message: notice_message,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user