提交 28046189 编写于 作者: fxy060608's avatar fxy060608

chore(hbuilderx): remove timestamp log

上级 d88bb52d
...@@ -78,6 +78,9 @@ export function formatInfoMsg( ...@@ -78,6 +78,9 @@ export function formatInfoMsg(
msg: string, msg: string,
options?: LogOptions & { nvue?: boolean } options?: LogOptions & { nvue?: boolean }
) { ) {
if (options && isInHBuilderX()) {
options.timestamp = false
}
initInfoFormattersOnce() initInfoFormattersOnce()
const formatter = infoFormatters.find(({ test }) => test(msg, options)) const formatter = infoFormatters.find(({ test }) => test(msg, options))
if (formatter) { if (formatter) {
......
...@@ -51,7 +51,7 @@ function initCheckUpdate() { ...@@ -51,7 +51,7 @@ function initCheckUpdate() {
function initLogger({ logger, nvue }: ResolvedConfig & { nvue?: boolean }) { function initLogger({ logger, nvue }: ResolvedConfig & { nvue?: boolean }) {
const { info, warn, error } = logger const { info, warn, error } = logger
logger.info = (msg, opts) => { logger.info = (msg, opts) => {
msg = formatInfoMsg(msg, extend({ nvue }, opts)) msg = formatInfoMsg(msg, extend(opts || {}, { nvue }))
if (msg) { if (msg) {
return info(msg, opts) return info(msg, opts)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册