Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document logger initialization for Rails #61

Merged
merged 1 commit into from
Oct 10, 2024
Merged
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
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