Skip to content

ANSI color codes in zm-testagent.out #1205

@PolaricEntropy

Description

@PolaricEntropy

I'm installing zm-testagent as a daemon service on Ubuntu 22.04 LTS by following the instructions, specifically this section: https://doc.zonemaster.net/latest/installation/zonemaster-backend.html#4-installation-on-debian-and-ubuntu

This sets up zm-testagent as a daemon service with the following command line perl /usr/local/bin/zonemaster_backend_testagent --logfile=/var/log/zonemaster/zm-testagent.log --outfile=/var/log/zonemaster/zm-testagent.out --pidfile=/var/run/zonemaster/zm-testagent.pid --user=zonemaster --group=zonemaster start

When the service starts successfully, zm-testagent.out is empty. However, if I introduce an error by making a typo in backend_config.ini to the database connection string, in that case, I get content in the zm-testagent.out file with color codes zonemaster-testagent �[32m[Started]�[0m.
I'm not sure if these color codes are by design or if it's possible to turn them off.

It is worth noting that /var/log/zonemaster/zm-testagent.log produces error messages that it cannot connect to the database.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-BugType: Bug in software or error in test case descriptionT-QuestionType: External question.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions