Skip to content

Commit

Permalink
feat: Use LOG_LEVEL when setting log level (#226)
Browse files Browse the repository at this point in the history
## Motivation

We were hard coding this previously to `info`. Allow it to be
customized.

## Change Summary

Allow log level to be configured using LOG_LEVEL envar.

## Merge Checklist

- [x] PR title adheres to the [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/) standard
- [x] PR has a changeset
- [x] PR has been tagged with a change label(s) (i.e. documentation,
feature, bugfix, or chore)
- [x] PR includes documentation if necessary
- [x] All commits have been signed
  • Loading branch information
sds authored Oct 26, 2024
1 parent 41e83c0 commit a4c367e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/brown-geese-pretend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farcaster/auth-relay": patch
---

fix: Allow log level to be configured via environment variable
4 changes: 3 additions & 1 deletion apps/relay/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { LOG_LEVEL } from "./env";

export const logger = {
level: "info",
level: LOG_LEVEL,
redact: [
"req.headers.authorization",
'req.headers["x-farcaster-auth-relay-key"]',
Expand Down

0 comments on commit a4c367e

Please sign in to comment.