MCPcopy Index your code
hub / github.com/open-cli-tools/concurrently / logCommandEvent

Method logCommandEvent

lib/logger.ts:258–271  ·  view source on GitHub ↗

* Logs an event for a command (e.g. start, stop). * * If raw mode is on, then nothing is logged.

(text: string, command: Command)

Source from the content-addressed store, hash-verified

256 * If raw mode is on, then nothing is logged.
257 */
258 logCommandEvent(text: string, command: Command) {
259 if (this.raw) {
260 return;
261 }
262
263 // Last write was from this command, but it didn't end with a line feed.
264 // Prepend one, otherwise the event's text will be concatenated to that write.
265 // A line feed is otherwise inserted anyway.
266 let prefix = '';
267 if (this.lastWrite?.command === command && this.lastWrite.char !== '\n') {
268 prefix = '\n';
269 }
270 this.logCommandText(`${prefix}${this.chalk.reset(text)}\n`, command);
271 }
272
273 logCommandText(text: string, command: Command) {
274 if (this.hide.includes(String(command.index)) || this.hide.includes(command.name)) {

Callers 5

logger.spec.tsFile · 0.80
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80
handleMethod · 0.80

Calls 1

logCommandTextMethod · 0.95

Tested by

no test coverage detected