MCPcopy Create free account
hub / github.com/nodejs/node / #formatLogItem

Method #formatLogItem

deps/npm/lib/utils/log-file.js:142–151  ·  view source on GitHub ↗
(level, title, ...args)

Source from the content-addressed store, hash-verified

140 }
141
142 #formatLogItem (level, title, ...args) {
143 // Only right timing logs to logfile if explicitly requests
144 if (level === log.KEYS.timing && !this.#timing) {
145 return null
146 }
147
148 this.#fileLogCount += 1
149 const prefix = [this.#totalLogCount++, level, title || null]
150 return formatWithOptions({ prefix, eol: os.EOL, colors: false }, ...args)
151 }
152
153 #getLogFilePath (count = '') {
154 return `${this.#path}debug-${count}.log`

Callers 2

loadMethod · 0.95
LogFilesClass · 0.95

Calls 1

formatWithOptionsFunction · 0.70

Tested by

no test coverage detected