Skip to content

Commit

Permalink
fix: lower minimum log level in production (#53)
Browse files Browse the repository at this point in the history
* fix: lower minimum log level in production

* docs: clarify changelog

---------

Co-authored-by: Richard Herman <[email protected]>
  • Loading branch information
GeekyEggo and GeekyEggo authored Sep 27, 2024
1 parent a7b1e80 commit 74c37ab
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
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

0 comments on commit 74c37ab

Please sign in to comment.