Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,39 @@ 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.

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