Unable to set no-color log output

Bug #2038917 reported by Yong-Hwan Baek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.log
New
Undecided
Unassigned

Bug Description

Hello

I am building a custom app using oslo.log running on apache httpd server. (We use olso to communicate with openstack services)
This app is deployed in kubernetes environment, so logs are collected through fluentd or like that.

In this situation every log prints ascii escape character(\x1b[00m) to reset terminal color.

Unfortunately, there is no way to remove or disable ascii escape character.
In configuration file setup process, every option fallbacks to ColorHandler.(https://opendev.org/openstack/oslo.log/src/commit/b5b8c30b0d925aa3d31b58932c94586631827b62/oslo_log/log.py#L365)

There are three handlers implemented (syslog, journal, color) but non of those can generate plain text without console color characters. (see. https://opendev.org/openstack/oslo.log/src/branch/master/oslo_log/handlers.py)

Could be a workaround to solve this issue?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.