mirror of
https://github.com/appium/appium.git
synced 2026-05-12 22:08:40 -05:00
fix(support): Init MOCK_LOG before creating static logger instance (#20750)
This commit is contained in:
@@ -6,8 +6,6 @@ import moment from 'moment';
|
||||
export const LEVELS = ['silly', 'verbose', 'debug', 'info', 'http', 'warn', 'error'];
|
||||
const MAX_LOG_RECORDS_COUNT = 3000;
|
||||
const PREFIX_TIMESTAMP_FORMAT = 'HH-mm-ss:SSS';
|
||||
// export a default logger with no prefix
|
||||
export const log = getLogger();
|
||||
// mock log object is used in testing mode to silence the output
|
||||
const MOCK_LOG = {
|
||||
unwrap: () => ({
|
||||
@@ -21,6 +19,8 @@ const MOCK_LOG = {
|
||||
}),
|
||||
...(_.fromPairs(LEVELS.map((l) => [l, _.noop]))),
|
||||
};
|
||||
// export a default logger with no prefix
|
||||
export const log = getLogger();
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user