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

fix: lower minimum log level in production #53

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@

# Change Log

## 1.0.1

### ♻️ Update

- Update minimum allowed log level in production to be `DEBUG` to assist with debugging (default remains `INFO`).

## 1.0.0

### ✨ New
Expand Down
2 changes: 1 addition & 1 deletion src/common/logging/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export type LoggerOptions = {
/**
* Minimum level the logger can be set to.
*/
minimumLevel?: LogLevel.INFO | LogLevel.TRACE;
minimumLevel?: LogLevel;

/**
* Optional value that defines the scope of the logger.
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/logging/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe("createLogger", () => {
// Assert.
expect(Logger).toHaveBeenCalledWith<[LoggerOptions]>({
level: LogLevel.INFO,
minimumLevel: LogLevel.INFO,
minimumLevel: LogLevel.DEBUG,
targets: [spyOnFileTarget.mock.instances[0]]
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/logging/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (isDebugMode()) {
*/
export const logger = new Logger({
level: isDebugMode() ? LogLevel.DEBUG : LogLevel.INFO,
minimumLevel: isDebugMode() ? LogLevel.TRACE : LogLevel.INFO,
minimumLevel: isDebugMode() ? LogLevel.TRACE : LogLevel.DEBUG,
targets
});

Expand Down