Merge branch 'features/syslog_logger' into 'develop'
Add logging to syslog See merge request pleroma/pleroma!622
This commit is contained in:
		
						commit
						4e5b156047
					
				
					 4 changed files with 19 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -91,6 +91,12 @@
 | 
			
		|||
  format: "$time $metadata[$level] $message\n",
 | 
			
		||||
  metadata: [:request_id]
 | 
			
		||||
 | 
			
		||||
config :logger, :ex_syslogger,
 | 
			
		||||
  level: :debug,
 | 
			
		||||
  ident: "Pleroma",
 | 
			
		||||
  format: "$date $time $metadata[$level] $message",
 | 
			
		||||
  metadata: [:request_id]
 | 
			
		||||
 | 
			
		||||
config :mime, :types, %{
 | 
			
		||||
  "application/xml" => ["xml"],
 | 
			
		||||
  "application/xrd+xml" => ["xrd+xml"],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -94,6 +94,10 @@ config :pleroma, Pleroma.Mailer,
 | 
			
		|||
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
 | 
			
		||||
    older software for theses nicknames.
 | 
			
		||||
 | 
			
		||||
## :logger
 | 
			
		||||
* `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog
 | 
			
		||||
See: [logger’s documentation](https://hexdocs.pm/logger/Logger.html) and [ex_syslogger’s documentation](https://hexdocs.pm/ex_syslogger/)
 | 
			
		||||
 | 
			
		||||
## :fe
 | 
			
		||||
This section is used to configure Pleroma-FE, unless ``:managed_config`` in ``:instance`` is set to false.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										9
									
								
								mix.exs
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								mix.exs
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -32,7 +32,11 @@ def project do
 | 
			
		|||
  #
 | 
			
		||||
  # Type `mix help compile.app` for more information.
 | 
			
		||||
  def application do
 | 
			
		||||
    [mod: {Pleroma.Application, []}, extra_applications: [:logger, :runtime_tools, :comeonin]]
 | 
			
		||||
    [
 | 
			
		||||
      mod: {Pleroma.Application, []},
 | 
			
		||||
      extra_applications: [:logger, :runtime_tools, :comeonin],
 | 
			
		||||
      included_applications: [:ex_syslogger]
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  # Specifies which paths to compile per environment.
 | 
			
		||||
| 
						 | 
				
			
			@ -76,7 +80,8 @@ defp deps do
 | 
			
		|||
      {:swoosh, "~> 0.20"},
 | 
			
		||||
      {:gen_smtp, "~> 0.13"},
 | 
			
		||||
      {:websocket_client, git: "https://github.com/jeremyong/websocket_client.git", only: :test},
 | 
			
		||||
      {:floki, "~> 0.20.0"}
 | 
			
		||||
      {:floki, "~> 0.20.0"},
 | 
			
		||||
      {:ex_syslogger, github: "slashmili/ex_syslogger", tag: "1.4.0"}
 | 
			
		||||
    ]
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								mix.lock
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								mix.lock
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -21,6 +21,7 @@
 | 
			
		|||
  "ex_doc": {:hex, :ex_doc, "0.19.1", "519bb9c19526ca51d326c060cb1778d4a9056b190086a8c6c115828eaccea6cf", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.7", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm"},
 | 
			
		||||
  "ex_machina": {:hex, :ex_machina, "2.2.0", "fec496331e04fc2db2a1a24fe317c12c0c4a50d2beb8ebb3531ed1f0d84be0ed", [:mix], [{:ecto, "~> 2.1", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm"},
 | 
			
		||||
  "floki": {:hex, :floki, "0.20.4", "be42ac911fece24b4c72f3b5846774b6e61b83fe685c2fc9d62093277fb3bc86", [:mix], [{:html_entities, "~> 0.4.0", [hex: :html_entities, repo: "hexpm", optional: false]}, {:mochiweb, "~> 2.15", [hex: :mochiweb, repo: "hexpm", optional: false]}], "hexpm"},
 | 
			
		||||
  "ex_syslogger": {:git, "https://github.com/slashmili/ex_syslogger.git", "f3963399047af17e038897c69e20d552e6899e1d", [tag: "1.4.0"]},
 | 
			
		||||
  "gen_smtp": {:hex, :gen_smtp, "0.13.0", "11f08504c4bdd831dc520b8f84a1dce5ce624474a797394e7aafd3c29f5dcd25", [:rebar3], [], "hexpm"},
 | 
			
		||||
  "gettext": {:hex, :gettext, "0.15.0", "40a2b8ce33a80ced7727e36768499fc9286881c43ebafccae6bab731e2b2b8ce", [:mix], [], "hexpm"},
 | 
			
		||||
  "hackney": {:hex, :hackney, "1.14.3", "b5f6f5dcc4f1fba340762738759209e21914516df6be440d85772542d4a5e412", [:rebar3], [{:certifi, "2.4.2", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.4", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"},
 | 
			
		||||
| 
						 | 
				
			
			@ -55,6 +56,7 @@
 | 
			
		|||
  "ranch": {:hex, :ranch, "1.3.2", "e4965a144dc9fbe70e5c077c65e73c57165416a901bd02ea899cfd95aa890986", [:rebar3], [], "hexpm"},
 | 
			
		||||
  "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.4", "f0eafff810d2041e93f915ef59899c923f4568f4585904d010387ed74988e77b", [:make, :mix, :rebar3], [], "hexpm"},
 | 
			
		||||
  "swoosh": {:hex, :swoosh, "0.20.0", "9a6c13822c9815993c03b6f8fccc370fcffb3c158d9754f67b1fdee6b3a5d928", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:gen_smtp, "~> 0.12", [hex: :gen_smtp, repo: "hexpm", optional: true]}, {:hackney, "~> 1.9", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.1", [hex: :mime, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm"},
 | 
			
		||||
  "syslog": {:git, "https://github.com/Vagabond/erlang-syslog.git", "4a6c6f2c996483e86c1320e9553f91d337bcb6aa", [tag: "1.0.5"]},
 | 
			
		||||
  "tesla": {:hex, :tesla, "1.2.1", "864783cc27f71dd8c8969163704752476cec0f3a51eb3b06393b3971dc9733ff", [:mix], [{:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "~> 4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}], "hexpm"},
 | 
			
		||||
  "trailing_format_plug": {:hex, :trailing_format_plug, "0.0.7", "64b877f912cf7273bed03379936df39894149e35137ac9509117e59866e10e45", [:mix], [{:plug, "> 0.12.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
 | 
			
		||||
  "tzdata": {:hex, :tzdata, "0.5.17", "50793e3d85af49736701da1a040c415c97dc1caf6464112fd9bd18f425d3053b", [:mix], [{:hackney, "~> 1.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"},
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue