From b0f4204266057316c11fc034da0ce86a212dc0b3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 13 Jul 2022 10:04:22 +0200 Subject: [PATCH] Relax log level 401 is expected when the token has expired federation issues are not very important --- server/lib/activitypub/actors/refresh.ts | 4 ++-- server/lib/activitypub/actors/shared/url-to-object.ts | 2 +- server/middlewares/auth.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/lib/activitypub/actors/refresh.ts b/server/lib/activitypub/actors/refresh.ts index 0acaa9f62..8ce2cd5d9 100644 --- a/server/lib/activitypub/actors/refresh.ts +++ b/server/lib/activitypub/actors/refresh.ts @@ -48,7 +48,7 @@ async function doRefresh (option const { actorObject } = await fetchRemoteActor(actorUrl) if (actorObject === undefined) { - logger.warn('Cannot fetch remote actor in refresh actor.') + logger.info('Cannot fetch remote actor %s in refresh actor.', actorUrl) return { actor, refreshed: false } } @@ -67,7 +67,7 @@ async function doRefresh (option return { actor: undefined, refreshed: false } } - logger.warn('Cannot refresh actor %s.', actor.url, { err, ...lTags() }) + logger.info('Cannot refresh actor %s.', actor.url, { err, ...lTags() }) return { actor, refreshed: false } } } diff --git a/server/lib/activitypub/actors/shared/url-to-object.ts b/server/lib/activitypub/actors/shared/url-to-object.ts index 982d52b79..7bc37f1ff 100644 --- a/server/lib/activitypub/actors/shared/url-to-object.ts +++ b/server/lib/activitypub/actors/shared/url-to-object.ts @@ -47,7 +47,7 @@ async function fetchActorTotalItems (url: string) { return body.totalItems || 0 } catch (err) { - logger.warn('Cannot fetch remote actor count %s.', url, { err }) + logger.info('Cannot fetch remote actor count %s.', url, { err }) return 0 } } diff --git a/server/middlewares/auth.ts b/server/middlewares/auth.ts index ad3b24ab2..904d47efd 100644 --- a/server/middlewares/auth.ts +++ b/server/middlewares/auth.ts @@ -14,7 +14,7 @@ function authenticate (req: express.Request, res: express.Response, next: expres return next() }) .catch(err => { - logger.warn('Cannot authenticate.', { err }) + logger.info('Cannot authenticate.', { err }) return res.fail({ status: err.status, -- 2.41.0