Skip to content

Commit f8f274b

Browse files
committed
refactor: type and code style
1 parent 18909f0 commit f8f274b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/utils/logging/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { config } from '@global/config';
88
*/
99
export const printIonWarning = (message: string, ...params: any[]) => {
1010
const logLevel = config.get('logLevel', 'WARN');
11-
if (logLevel === 'WARN' || logLevel === 'ERROR') {
11+
if (['WARN', 'ERROR'].includes(logLevel)) {
1212
return console.warn(`[Ionic Warn]: ${message}`, ...params);
1313
}
1414
};
@@ -20,9 +20,9 @@ export const printIonWarning = (message: string, ...params: any[]) => {
2020
* @param message - The string message to be logged to the console.
2121
* @param params - Additional arguments to supply to the console.error.
2222
*/
23-
export const printIonError = (message: string, ...params: any) => {
23+
export const printIonError = (message: string, ...params: any[]) => {
2424
const logLevel = config.get('logLevel', 'ERROR');
25-
if (logLevel === 'ERROR') {
25+
if (['ERROR'].includes(logLevel)) {
2626
return console.error(`[Ionic Error]: ${message}`, ...params);
2727
}
2828
};

0 commit comments

Comments
 (0)