Move ANSI logging format from Runwar to CommandBox

Description

Runwar's console logger is using a Log4j appender that applies ANSI formatting, but this causes issues for people who are directly tailing the output of a server process. Remove that ANSI formatting from Runwar and modify the

  • server start debug/console command

  • server log --follow command

to add it back in as necessary based on the line prefix.

Activity

Show:
Brad Wood
March 25, 2020, 10:39 PM

I need you to do the Runwar portion of this ticket first, and then assign to me so I can do the CommandBox portion.

Miguel Mathus
August 18, 2020, 12:17 AM

Hello I have been checking all the logging on runwar for this ticket, is related to the colors too?

Brad Wood
August 19, 2020, 5:04 PM

Yes, this is specifically about the colors. The runwar logger is adding ANSI formatting to the output in order to colorize the logs. We could adjust runwar to try and detect if the console out is a TTY and only include the ANSI then, but it’s easiest to simply remove that functionality entirely. CommandBox already has logic to add the colors back in itself, so this would only even matter if a user were to fire up a server from runwar directly, skipping CommandBox, in a console. And the only real life use case of that I can think of right now would be a user running a docker container interactively with a finalized CFML image.

Miguel Mathus
August 31, 2020, 3:52 PM

Hi I was able to remove the appender that was adding the colors in runwar, right now all the trace in runwar is white and plain.

Fixed

Assignee

Miguel Mathus

Reporter

Brad Wood

Labels

None

Affects versions

Fix versions

Priority

Major

Components