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" +```