From d2d9aeff25c0ed2d3a4f3e1daf4fa1f0852345f7 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 31 Aug 2023 20:59:00 +0200 Subject: [PATCH 1/4] :paperclip: Reduce log level of worker submit operation Start logging to as TRACE instead of DEBUG --- backend/src/app/worker.clj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/app/worker.clj b/backend/src/app/worker.clj index 1c7bcfd1bc..4d5a9d728f 100644 --- a/backend/src/app/worker.clj +++ b/backend/src/app/worker.clj @@ -678,13 +678,13 @@ (-> (db/exec-one! conn [sql:remove-not-started-tasks task queue label]) :next.jdbc/update-count))] - (l/debug :hint "submit task" - :name task - :queue queue - :label label - :dedupe (boolean dedupe) - :deleted (or deleted 0) - :in (dt/format-duration duration)) + (l/trc :hint "submit task" + :name task + :queue queue + :label label + :dedupe (boolean dedupe) + :deleted (or deleted 0) + :in (dt/format-duration duration)) (db/exec-one! conn [sql:insert-new-task id task props queue label priority max-retries interval]) From 1384219ae72cf4c40848d68f6363e1f64d3fb42b Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 31 Aug 2023 21:08:01 +0200 Subject: [PATCH 2/4] :paperclip: Update devenv logging file --- backend/resources/log4j2-devenv.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/resources/log4j2-devenv.xml b/backend/resources/log4j2-devenv.xml index 8c11428871..947d06e268 100644 --- a/backend/resources/log4j2-devenv.xml +++ b/backend/resources/log4j2-devenv.xml @@ -23,7 +23,7 @@ - + From 750cf0578470e7eeb97611d96c32302d21e61da4 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 31 Aug 2023 21:08:23 +0200 Subject: [PATCH 3/4] :sparkles: Add minor logging related improvements to binfile namespace --- backend/src/app/rpc/commands/binfile.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/app/rpc/commands/binfile.clj b/backend/src/app/rpc/commands/binfile.clj index bbcca6b88f..140d637f6b 100644 --- a/backend/src/app/rpc/commands/binfile.clj +++ b/backend/src/app/rpc/commands/binfile.clj @@ -773,7 +773,7 @@ (defn- lookup-index [id] (let [val (get-in @*state* [:index id])] - (l/debug :fn "lookup-index" :id id :val val ::l/sync? true) + (l/trc :fn "lookup-index" :id id :val val ::l/sync? true) (when (and (not (::ignore-index-errors? *options*)) (not val)) (ex/raise :type :validation :code :incomplete-index From a3495800b57e3cc585c0f638a73dc105f4a6f997 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 31 Aug 2023 21:09:18 +0200 Subject: [PATCH 4/4] :sparkles: Add minor logging improvements to worker namespace --- backend/src/app/worker.clj | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/src/app/worker.clj b/backend/src/app/worker.clj index 4d5a9d728f..8bafe3a8a6 100644 --- a/backend/src/app/worker.clj +++ b/backend/src/app/worker.clj @@ -207,10 +207,10 @@ (db/create-array conn "uuid" ids)]] (db/exec-one! conn sql) - (l/debug :hist "dispatcher: queue tasks" - :queue queue - :tasks (count ids) - :queued res))) + (l/dbg :hist "dispatcher: queue tasks" + :queue queue + :tasks (count ids) + :queued res))) (run-batch! [rconn] (try @@ -433,12 +433,12 @@ :else (try - (l/debug :hint "worker: executing task" - :name (:name task) - :id (:id task) - :queue queue - :worker-id worker-id - :retry (:retry-num task)) + (l/dbg :hint "worker: executing task" + :name (:name task) + :id (str (:id task)) + :queue queue + :worker-id worker-id + :retry (:retry-num task)) (handle-task task) (catch InterruptedException cause (throw cause))