Skip to content

Commit 13b1441

Browse files
committed
refactor(utils): OFF not INFO
1 parent e3c8acd commit 13b1441

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

core/src/utils/logging/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { config } from '@global/config';
22

33
export const enum LogLevel {
4-
INFO = 'INFO',
4+
OFF = 'OFF',
55
ERROR = 'ERROR',
66
WARN = 'WARN',
77
}

core/src/utils/logging/test/logging.spec.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { config } from '@global/config';
2+
import { LogLevel } from '../index';
23

34
import { printIonError, printIonWarning } from '../index';
45

@@ -28,7 +29,7 @@ describe('Logging', () => {
2829

2930
describe("when the logLevel configuration is set to 'WARN'", () => {
3031
it('logs a warning to the console', () => {
31-
config.set('logLevel', 'WARN');
32+
config.set('logLevel', LogLevel.WARN);
3233

3334
printIonWarning('This is a warning message');
3435

@@ -38,7 +39,7 @@ describe('Logging', () => {
3839

3940
describe("when the logLevel configuration is set to 'ERROR'", () => {
4041
it('does not log a warning to the console', () => {
41-
config.set('logLevel', 'ERROR');
42+
config.set('logLevel', LogLevel.ERROR);
4243

4344
printIonWarning('This is a warning message');
4445

@@ -48,7 +49,7 @@ describe('Logging', () => {
4849

4950
describe("when the logLevel configuration is set to 'OFF'", () => {
5051
it('does not log a warning to the console', () => {
51-
config.set('logLevel', 'OFF');
52+
config.set('logLevel', LogLevel.OFF);
5253

5354
printIonWarning('This is a warning message');
5455

@@ -82,7 +83,7 @@ describe('Logging', () => {
8283

8384
describe("when the logLevel configuration is set to 'ERROR'", () => {
8485
it('logs an error to the console', () => {
85-
config.set('logLevel', 'ERROR');
86+
config.set('logLevel', LogLevel.ERROR);
8687

8788
printIonError('This is an error message');
8889

@@ -92,7 +93,7 @@ describe('Logging', () => {
9293

9394
describe("when the logLevel configuration is set to 'WARN'", () => {
9495
it('logs an error to the console', () => {
95-
config.set('logLevel', 'WARN');
96+
config.set('logLevel', LogLevel.WARN);
9697

9798
printIonError('This is an error message');
9899

@@ -102,7 +103,7 @@ describe('Logging', () => {
102103

103104
describe("when the logLevel configuration is set to 'OFF'", () => {
104105
it('does not log an error to the console', () => {
105-
config.set('logLevel', 'OFF');
106+
config.set('logLevel', LogLevel.OFF);
106107

107108
printIonError('This is an error message');
108109

0 commit comments

Comments
 (0)