@@ -4,7 +4,6 @@ import readline from 'node:readline'
4
4
import colors from 'picocolors'
5
5
import type { RollupError } from 'rollup'
6
6
import type { ResolvedServerUrls } from './server'
7
- import { splitRE } from './utils'
8
7
9
8
export type LogType = 'error' | 'warn' | 'info'
10
9
export type LogLevel = LogType | 'silent'
@@ -64,8 +63,6 @@ function getTimeFormatter() {
64
63
return timeFormatter
65
64
}
66
65
67
- const MAX_LOG_CHAR = 5000
68
-
69
66
export function createLogger (
70
67
level : LogLevel = 'info' ,
71
68
options : LoggerOptions = { } ,
@@ -81,22 +78,7 @@ export function createLogger(
81
78
allowClearScreen && process . stdout . isTTY && ! process . env . CI
82
79
const clear = canClearScreen ? clearScreen : ( ) => { }
83
80
84
- function preventOverflow ( msg : string ) {
85
- if ( msg . length > MAX_LOG_CHAR ) {
86
- const shorten = msg . slice ( 0 , MAX_LOG_CHAR )
87
- const lines = msg . slice ( MAX_LOG_CHAR ) . match ( splitRE ) ?. length || 0
88
-
89
- return `${ shorten } \n... and ${ lines } lines more`
90
- }
91
- return msg
92
- }
93
-
94
- function format (
95
- type : LogType ,
96
- rawMsg : string ,
97
- options : LogErrorOptions = { } ,
98
- ) {
99
- const msg = preventOverflow ( rawMsg )
81
+ function format ( type : LogType , msg : string , options : LogErrorOptions = { } ) {
100
82
if ( options . timestamp ) {
101
83
const tag =
102
84
type === 'info'
0 commit comments