feat(server): don't log individual internal messages

This commit is contained in:
Paul Campbell 2024-05-18 22:26:44 +01:00
parent 76472fa74a
commit ee83def127

View file

@ -91,7 +91,6 @@ impl Handler<CloneRepo> for RepoActor {
type Result = (); type Result = ();
#[tracing::instrument(name = "RepoActor::CloneRepo", skip_all, fields(repo = %self.details, gitdir = %self.details.gitdir))] #[tracing::instrument(name = "RepoActor::CloneRepo", skip_all, fields(repo = %self.details, gitdir = %self.details.gitdir))]
fn handle(&mut self, _msg: CloneRepo, ctx: &mut Self::Context) -> Self::Result { fn handle(&mut self, _msg: CloneRepo, ctx: &mut Self::Context) -> Self::Result {
info!("Message Received");
let gitdir = self.details.gitdir.clone(); let gitdir = self.details.gitdir.clone();
match self.forge.repo_clone(gitdir) { match self.forge.repo_clone(gitdir) {
Ok(repository) => { Ok(repository) => {
@ -116,7 +115,6 @@ impl Handler<LoadConfigFromRepo> for RepoActor {
type Result = (); type Result = ();
#[tracing::instrument(name = "RepoActor::LoadConfigFromRepo", skip_all, fields(repo = %self.details))] #[tracing::instrument(name = "RepoActor::LoadConfigFromRepo", skip_all, fields(repo = %self.details))]
fn handle(&mut self, _msg: LoadConfigFromRepo, ctx: &mut Self::Context) -> Self::Result { fn handle(&mut self, _msg: LoadConfigFromRepo, ctx: &mut Self::Context) -> Self::Result {
info!("Message Received");
let details = self.details.clone(); let details = self.details.clone();
let addr = ctx.address(); let addr = ctx.address();
let forge = self.forge.clone(); let forge = self.forge.clone();
@ -134,7 +132,6 @@ impl Handler<LoadedConfig> for RepoActor {
type Result = (); type Result = ();
#[tracing::instrument(name = "RepoActor::LoadedConfig", skip_all, fields(repo = %self.details, branches = %msg.0))] #[tracing::instrument(name = "RepoActor::LoadedConfig", skip_all, fields(repo = %self.details, branches = %msg.0))]
fn handle(&mut self, msg: LoadedConfig, ctx: &mut Self::Context) -> Self::Result { fn handle(&mut self, msg: LoadedConfig, ctx: &mut Self::Context) -> Self::Result {
info!("Message Received");
let repo_config = msg.0; let repo_config = msg.0;
self.details.repo_config.replace(repo_config); self.details.repo_config.replace(repo_config);
@ -166,7 +163,6 @@ impl Handler<ValidateRepo> for RepoActor {
// do nothing // do nothing
} }
} }
info!("Message Received");
if self.webhook_id.is_none() { if self.webhook_id.is_none() {
webhook::register( webhook::register(
self.details.clone(), self.details.clone(),
@ -210,7 +206,6 @@ impl Handler<StartMonitoring> for RepoActor {
fields(token = %self.message_token, repo = %self.details, main = %msg.main, next= %msg.next, dev = %msg.dev)) fields(token = %self.message_token, repo = %self.details, main = %msg.main, next= %msg.next, dev = %msg.dev))
] ]
fn handle(&mut self, msg: StartMonitoring, ctx: &mut Self::Context) -> Self::Result { fn handle(&mut self, msg: StartMonitoring, ctx: &mut Self::Context) -> Self::Result {
info!("Message Received");
let Some(repo_config) = self.details.repo_config.clone() else { let Some(repo_config) = self.details.repo_config.clone() else {
warn!("No config loaded"); warn!("No config loaded");
return; return;
@ -254,7 +249,6 @@ impl Handler<WebhookRegistered> for RepoActor {
type Result = (); type Result = ();
#[tracing::instrument(name = "RepoActor::WebhookRegistered", skip_all, fields(repo = %self.details, webhook_id = %msg.0))] #[tracing::instrument(name = "RepoActor::WebhookRegistered", skip_all, fields(repo = %self.details, webhook_id = %msg.0))]
fn handle(&mut self, msg: WebhookRegistered, _ctx: &mut Self::Context) -> Self::Result { fn handle(&mut self, msg: WebhookRegistered, _ctx: &mut Self::Context) -> Self::Result {
info!("Message Received");
self.webhook_id.replace(msg.0); self.webhook_id.replace(msg.0);
self.webhook_auth.replace(msg.1); self.webhook_auth.replace(msg.1);
} }
@ -267,7 +261,6 @@ impl Handler<AdvanceMainTo> for RepoActor {
type Result = (); type Result = ();
#[tracing::instrument(name = "RepoActor::AdvanceMainTo", skip_all, fields(repo = %self.details, commit = %msg.0))] #[tracing::instrument(name = "RepoActor::AdvanceMainTo", skip_all, fields(repo = %self.details, commit = %msg.0))]
fn handle(&mut self, msg: AdvanceMainTo, ctx: &mut Self::Context) -> Self::Result { fn handle(&mut self, msg: AdvanceMainTo, ctx: &mut Self::Context) -> Self::Result {
info!("Message Received");
let Some(repo_config) = self.details.repo_config.clone() else { let Some(repo_config) = self.details.repo_config.clone() else {
warn!("No config loaded"); warn!("No config loaded");
return; return;