Browse Source

Set log level to debug for not important messages

chore/benchmark-dedicated-db
Egor Kislitsyn 4 years ago
parent
commit
ee6805850c
6 changed files with 11 additions and 11 deletions
  1. +3
    -3
      lib/pleroma/web/activity_pub/activity_pub_controller.ex
  2. +1
    -1
      lib/pleroma/web/activity_pub/mrf/drop_policy.ex
  3. +1
    -1
      lib/pleroma/web/activity_pub/mrf/mediaproxy_warming_policy.ex
  4. +1
    -1
      lib/pleroma/web/activity_pub/publisher.ex
  5. +4
    -4
      lib/pleroma/web/federator/federator.ex
  6. +1
    -1
      lib/pleroma/web/federator/publisher.ex

+ 3
- 3
lib/pleroma/web/activity_pub/activity_pub_controller.ex View File

@@ -257,7 +257,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do

# only accept relayed Creates
def inbox(conn, %{"type" => "Create"} = params) do
Logger.info(
Logger.debug(
"Signature missing or not from author, relayed Create message, fetching object from source"
)

@@ -270,11 +270,11 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
headers = Enum.into(conn.req_headers, %{})

if String.contains?(headers["signature"], params["actor"]) do
Logger.info(
Logger.debug(
"Signature validation error for: #{params["actor"]}, make sure you are forwarding the HTTP Host header!"
)

Logger.info(inspect(conn.req_headers))
Logger.debug(inspect(conn.req_headers))
end

json(conn, dgettext("errors", "error"))


+ 1
- 1
lib/pleroma/web/activity_pub/mrf/drop_policy.ex View File

@@ -9,7 +9,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.DropPolicy do

@impl true
def filter(object) do
Logger.info("REJECTING #{inspect(object)}")
Logger.debug("REJECTING #{inspect(object)}")
{:reject, object}
end



+ 1
- 1
lib/pleroma/web/activity_pub/mrf/mediaproxy_warming_policy.ex View File

@@ -18,7 +18,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy do
]

def perform(:prefetch, url) do
Logger.info("Prefetching #{inspect(url)}")
Logger.debug("Prefetching #{inspect(url)}")

url
|> MediaProxy.url()


+ 1
- 1
lib/pleroma/web/activity_pub/publisher.ex View File

@@ -223,7 +223,7 @@ defmodule Pleroma.Web.ActivityPub.Publisher do
public = is_public?(activity)

if public && Config.get([:instance, :allow_relay]) do
Logger.info(fn -> "Relaying #{activity.data["id"]} out" end)
Logger.debug(fn -> "Relaying #{activity.data["id"]} out" end)
Relay.publish(activity)
end



+ 4
- 4
lib/pleroma/web/federator/federator.ex View File

@@ -58,7 +58,7 @@ defmodule Pleroma.Web.Federator do
end

def perform(:incoming_ap_doc, params) do
Logger.info("Handling incoming AP activity")
Logger.debug("Handling incoming AP activity")

params = Utils.normalize_params(params)

@@ -71,13 +71,13 @@ defmodule Pleroma.Web.Federator do
{:ok, activity}
else
%Activity{} ->
Logger.info("Already had #{params["id"]}")
Logger.debug("Already had #{params["id"]}")
:error

_e ->
# Just drop those for now
Logger.info("Unhandled activity")
Logger.info(Jason.encode!(params, pretty: true))
Logger.debug("Unhandled activity")
Logger.debug(Jason.encode!(params, pretty: true))
:error
end
end


+ 1
- 1
lib/pleroma/web/federator/publisher.ex View File

@@ -47,7 +47,7 @@ defmodule Pleroma.Web.Federator.Publisher do
Config.get([:instance, :federation_publisher_modules])
|> Enum.each(fn module ->
if module.is_representable?(activity) do
Logger.info("Publishing #{activity.data["id"]} using #{inspect(module)}")
Logger.debug("Publishing #{activity.data["id"]} using #{inspect(module)}")
module.publish(user, activity)
end
end)


Loading…
Cancel
Save