Skip to content

Commit

Permalink
document logger initialization for Rails
Browse files Browse the repository at this point in the history
  • Loading branch information
skaes committed Oct 10, 2024
1 parent 44272dd commit 26b6816
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ module LogjamAgent
end
```

### Logger setup

The gem ships with a railtie that sets up a logjam agent specific logger which serves the
dual purpose of collecting log lines to be published on the logjam logging bus once the
request is complete and sending them to the log device as they are produced.

The logger setup code in the Rails environment specific initialization files should be
removed. Setup code which can remain without affecting logjam functionality is setting the
log level or changing the log formatter. It is advisable to read the logger initialization
code contained in file `lib/logjam_agent/railtie.rb` to understand what's going on behind
the scenes.


### Generating unique request ids

The agent generates unique request ids for all request handled using standard
Expand Down

0 comments on commit 26b6816

Please sign in to comment.