From 178c5057489f3cce64ee7da42f2d9c7879aecf77 Mon Sep 17 00:00:00 2001 From: szTheory Date: Tue, 3 Mar 2020 21:17:40 +0000 Subject: [PATCH] README markdown syntax highlighting --- README.md | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7dcdb98..a366e59 100644 --- a/README.md +++ b/README.md @@ -9,22 +9,28 @@ Simple Elixir logger which publishes messages in RabbitMQ Add Rogger as a dependency in your mix.exs file. - def deps do - [{:rogger, "~> 0.0.3"}] - end +```elixir +def deps do + [{:rogger, "~> 0.0.3"}] +end +``` Include :rogger in your application list: - def application do - [applications: [:rogger]] - end +```elixir +def application do + [applications: [:rogger]] +end +``` Add configuration related to your RabbitMQ instance: - config :rogger, - host: "localhost", - username: "guest", - password: "guest" +```elixir +config :rogger, + host: "localhost", + username: "guest", + password: "guest" +``` Start Rogger process using **Rogger.start_link([])** anywhere in your application or register it as a supervised process. @@ -32,8 +38,10 @@ Then, run **mix deps.get** to fetch and compile Rogger. Publish your logs : - Rogger.info "Some info message" +```elixir +Rogger.info "Some info message" - Rogger.warn "Some warning message" +Rogger.warn "Some warning message" - Rogger.error "Some error message" +Rogger.error "Some error message" +```