This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 578366 - Quiet mode to disable ANSI codes in log files
Quiet mode to disable ANSI codes in log files
Status: CLOSED ERRATA
Product: Publican
Classification: Community
Component: publican (Show other bugs)
1.6
All Linux
low Severity low
: ---
: ---
Assigned To: Jeff Fearn
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-30 23:14 EDT by Sean Flanigan
Modified: 2010-11-23 23:18 EST (History)
5 users (show)

See Also:
Fixed In Version: publican-1.6.3-0.fc12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-17 14:56:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Sean Flanigan 2010-03-30 23:14:12 EDT
Description of problem:
I'm running publican from a continuous build server (Hudson), and the output is a little cluttered, partly because Hudson treats logs as plain text.  The same thing happens if you redirect stderr to a file and view it in plain text mode.

Would it be possible to add a --quiet mode, or --color=never, or perhaps to auto-detect output streams which don't support ANSI codes?

Version-Release number of selected component (if applicable):
1.6.1

How reproducible:


Steps to Reproduce:
1. publican build > logfile 2>&1
2. /usr/bin/less logfile
  
Actual results:

[36m	PO file 'de-DE/known_issues.po' not found! Using base XML!
[0m[36m	PO file 'de-DE/migration.po' not found! Using base XML!
[0m[36m	PO file 'de-DE/new_features.po' not found! Using base XML!
[0m[36m	PO file 'de-DE/tech_previews.po' not found! Using base XML!
[0m[36m	PO file 'de-DE/upgrading.po' not found! Using base XML!
[0m	Processing file tmp/de-DE/xml/Common_Content/Conventions.xml

Expected results:

	PO file 'de-DE/known_issues.po' not found! Using base XML!
	PO file 'de-DE/migration.po' not found! Using base XML!
	PO file 'de-DE/new_features.po' not found! Using base XML!
	PO file 'de-DE/tech_previews.po' not found! Using base XML!
	PO file 'de-DE/upgrading.po' not found! Using base XML!
	Processing file tmp/de-DE/xml/Common_Content/Conventions.xml

Additional info:

It would also be nice the quiet mode could override the debug option in case it is specified in publican.cfg.
Comment 1 Ruediger Landmann 2010-03-31 23:11:46 EDT
--quiet and --nocolours options tested and working in 1.6.1-0.t29
Comment 2 Fedora Update System 2010-04-01 01:15:16 EDT
publican-1.6.2-0.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/publican-1.6.2-0.fc12
Comment 3 Fedora Update System 2010-04-01 01:15:41 EDT
publican-1.6.2-0.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/publican-1.6.2-0.fc11
Comment 4 Fedora Update System 2010-04-01 01:16:08 EDT
publican-1.6.2-0.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/publican-1.6.2-0.fc13
Comment 5 Sean Flanigan 2010-04-01 03:29:32 EDT
Thanks Jeff; it looks good, and I'm glad to see colour spelt better than I had dared hope!

Just a few minor things:

1. The descriptions of the new options don't line up with the other global options, at least on my terminal:
ie:
        -v                  Display the version of Publican
        --config <file>     Use a nonstandard config file
        --nocolours Disable ANSI colourisation of logging
        --quiet     Disable all logging

This is purely cosmetic, but it might bother some people.


2. Also, I found that these new options had to be entered after the action, eg

   publican build --quiet
not 
   publican --quiet build

The usage help (and the Publican documentation) seem to assume that global options never appear together with an action, but my experience with other command line tools does lead me to expect that global options will precede actions, eg:
   svn --non-interactive update


3. The Publican documentation hasn't been updated to describe these options, but I don't know if that's significant at this point.

Thanks for the quick turnaround!
Comment 6 Fedora Update System 2010-04-03 00:39:51 EDT
publican-1.6.2-0.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2010-04-03 00:50:30 EDT
publican-1.6.2-0.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Jeff Fearn 2010-04-05 22:00:50 EDT
This was confusing so I renamed and reordered the options and the help texts. Mainly because there are 3 kinds of options and only 2 were appearing in the helps texts >_<

Renamed 'Global Options' to 'Command Options' these apply only to the publican command, not to actions.

Renamed 'Options' to 'Action Options' these apply only to actions not to the publican command.

Displayed 'Common Options', common_config, nocolour etc, as part of the action help text.

$ bin/publican --help

Usage:
    publican <command options>

    publican <action> <action options>

    Command Options

        --help              Display help message
        --man               Display the man page
        --help_actions      Display a list of valid actions
        -v                  Display the version of Publican

    Run: 'publican <action> --help' for details on action usage

    Valid actions are:

        build         Transform XML to other formats (pdf, html, html-single, etc)
...


$ bin/publican build --help
build
    Transform XML to other formats (pdf, html, html-single, etc)

        Options:
        --help                    Display help message
        --config=s                Use a nonstandard config file
        --common_config=s         Override path to Common_Config directory
        --common_content=s        Override path to Common_Content directory
        --nocolours               Disable ANSI colourisation of logging.
        --quiet                   Disable all logging.
        --formats=<FORMATS>       Comma-separated list of formats, for example: html,pdf,html-single,html-desktop,txt,epub
        --langs=<LANGS>           Comma-separated list of languages, for example: en-US,de-DE,all
...


Will begin bugging Rudi to update docs :)
Comment 9 Fedora Update System 2010-04-09 00:27:57 EDT
publican-1.6.2-0.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Jeff Fearn 2010-04-09 21:57:33 EDT
FYI I opened https://bugzilla.redhat.com/show_bug.cgi?id=581090 to address the naming issue in the next major version, since I think it's too disruptive for a minor version.
Comment 11 Fedora Update System 2010-05-13 18:20:05 EDT
publican-1.6.3-0.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc13
Comment 12 Fedora Update System 2010-05-13 18:21:28 EDT
publican-1.6.3-0.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc12
Comment 13 Fedora Update System 2010-05-15 16:35:41 EDT
publican-1.6.3-0.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update publican'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc12
Comment 14 Fedora Update System 2010-05-15 16:45:04 EDT
publican-1.6.3-0.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update publican'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/publican-1.6.3-0.fc13
Comment 15 Fedora Update System 2010-05-17 14:54:59 EDT
publican-1.6.3-0.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2010-05-17 14:58:53 EDT
publican-1.6.3-0.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.