Skip Menu |
 

This queue is for tickets about the Term-ANSIColor CPAN distribution.

Report information
The Basics
Id: 87755
Status: rejected
Priority: 0/
Queue: Term-ANSIColor

People
Owner: Nobody in particular
Requestors: nooneofconsequence [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From nooneofconsequence [...] gmail.com Fri Aug 9 19: 02:12 2013
MIME-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
X-Spam-Status: No, score=-6.22 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
X-Mailer: Apple Mail (2.1508)
X-Spam-Flag: NO
X-Virus-Checked: Checked
Message-ID: <73F3C428-EB25-45F4-97B0-3A9B88DCAC02 [...] gmail.com>
Content-Type: multipart/signed; boundary="Apple-Mail=_2D5DED70-0BF9-4EF0-BB75-F72122D82D6A"; micalg="sha1"; protocol="application/pkcs7-signature"
X-Received: by 10.68.12.134 with SMTP id y6mr13849394pbb.29.1376089316913; Fri, 09 Aug 2013 16:01:56 -0700 (PDT)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -6.22
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id C4E3E61E007 for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 19:02:12 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A8+QeaiFwcUi for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 19:02:10 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id B27CC2410C1 for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 19:02:09 -0400 (EDT)
Received: (qmail 31310 invoked by alias); 9 Aug 2013 23:02:09 -0000
Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 09 Aug 2013 16:02:01 -0700
Received: by mail-pb0-f41.google.com with SMTP id rp2so5034943pbb.14 for <multiple recipients>; Fri, 09 Aug 2013 16:01:57 -0700 (PDT)
Received: from [192.168.42.129] (ip72-199-149-206.sd.sd.cox.net. [72.199.149.206]) by mx.google.com with ESMTPSA id lm2sm24755180pab.2.2013.08.09.16.01.53 for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 16:01:55 -0700 (PDT)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
Subject: Log::Log4perl::Appender::ScreenColoredLevels no longer issues RESET
Return-Path: <nooneofconsequence [...] gmail.com>
X-RT-Mail-Extension: term-ansicolor
X-Original-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=j7vg7fq8tnvT3IQmmFBcaQpbFiSFPEPvIE2PZFRVFnk=; b=gZOOIqpxaobKPFMIyPpTgOuX+aeQUV4CvdcIeMSpWwmDv7UFYKSaj8IBkS48K89dq3 2+Nis5ceVq5KRN2nNos79iBG3jElmqldEvfvLLlbf3yR6KFb8HnHa8jhtigZDCFyubu9 HyRXvbOvWvQdmnWZUEXHq8aO4FJPVn/+N41WPV51Q4aiK6HJtJd5RGk+S9RnT7N+F0U6 rulYHnzf8n4DF0vlBM/qfWIcDr8qouo2sCOxeFsVYtW2KMHbCM6OIpYp3lvIyvV+iB5S A0txUxx0FaR4yWfgNUME4HbBhYYjXD6YHOECM/TMjnar6tqe070tfOVhM9GaqKEVgdQv 8crA==
Date: Fri, 9 Aug 2013 16:01:55 -0700
X-Spam-Level:
To: bug-Log-Log4perl [...] rt.cpan.org, bug-Term-ANSIColor [...] rt.cpan.org
From: Michael Hicks <nooneofconsequence [...] gmail.com>
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: ascii
Content-Length: 1783
Download (untitled) / with headers
text/plain 1.7k
I think this is possibly due to a bug in Term::ANSIColor but I'm not sure. I've noticed that if I'm using Log::Log4perl::Appender::ScreenColoredLevels as my appended and have normal perl print statements following a log4perl logger invocation, whatever color setting was used for the last log4perl print gets used for my standard print statement as well. I see that in the patch from issue 30899 which replaced the prior way of using Term::ANSIColor qw(:constants) and actually specifying the RESET in the formatting like: return GREEN . $message . RESET; with the new way of using the Term::ANSIColor colored function like: $msg = Term::ANSIColor::colored( $msg, $color ); from the documentation on Term::ANSIColor here: http://search.cpan.org/~rra/Term-ANSIColor-4.02/ANSIColor.pm it seems colored() is supposed to add the reset for you. "As an aid in resetting colors, colored() takes a scalar as the first argument and any number of attribute strings as the second argument and returns the scalar wrapped in escape codes so that the attributes will be set as requested before the string and reset to normal after the string." I am currently working around this problem by importing the constants interface to my script use Term::ANSIColor qw(:constants); and then adding print RESET; between any log4perl lines and plain ol print statements I want to use which restores the behavior I think I'm used to. I'm seeing this on Debian 7 with liblog-log4perl-perl 1.29-1 which has the version string our $VERSION = '1.29'; in the /usr/share/perl5/Log/Log4perl.pm file and Term::ANSIColor; $VERSION = '3.00'; Michael Hicks nooneofconsequence@gmail.com Sometimes being wrong in interesting ways about interesting things is quite good for starting discussions.
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64
Content-Length: 4139
Download smime.p7s
application/pkcs7-signature 4k

Message body not shown because it is not plain text.

From rra [...] stanford.edu Fri Aug 9 19: 25:50 2013
MIME-Version: 1.0
X-Spam-Status: No, score=-5.639 tagged_above=-99.9 required=10 tests=[AWL=0.482, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-4.0.16-15305-1376089333-1956.87755-4-0 [...] rt.cpan.org> (Michael Hicks via's message of "Fri, 9 Aug 2013 19:02:14 -0400")
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-87755 [...] rt.cpan.org> <73F3C428-EB25-45F4-97B0-3A9B88DCAC02 [...] gmail.com> <rt-4.0.16-15305-1376089333-1956.87755-4-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <87ob96xx8w.fsf [...] windlord.stanford.edu>
content-type: text/plain; charset="utf-8"
Organization: The Eyrie
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.639
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id F16F761E003 for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 19:25:49 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cguj1BZnay4K for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 19:25:48 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id AE92E2410BB for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 19:25:47 -0400 (EDT)
Received: (qmail 622 invoked by alias); 9 Aug 2013 23:25:46 -0000
Received: from smtp1.Stanford.EDU (HELO smtp.stanford.edu) (171.67.219.81) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 09 Aug 2013 16:25:40 -0700
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 9936F140FD7 for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 16:25:36 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.stanford.edu (Postfix) with ESMTPS id 00F15140EA1 for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 16:25:36 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000) id DB15B2F553; Fri, 9 Aug 2013 16:25:35 -0700 (PDT)
Delivered-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #87755] Log::Log4perl::Appender::ScreenColoredLevels no longer issues RESET
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Return-Path: <rra [...] stanford.edu>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
X-RT-Mail-Extension: term-ansicolor
Date: Fri, 09 Aug 2013 16:25:35 -0700
X-Spam-Level:
To: bug-Term-ANSIColor [...] rt.cpan.org
From: Russ Allbery <rra [...] stanford.edu>
RT-Message-ID: <rt-4.0.16-16681-1376090750-48.87755-0-0 [...] rt.cpan.org>
Content-Length: 1041
"Michael Hicks via RT" <bug-Term-ANSIColor@rt.cpan.org> writes: Show quoted text
> I see that in the patch from issue 30899 which replaced the prior way of > using Term::ANSIColor qw(:constants) and actually specifying the RESET > in the formatting like:
Show quoted text
> return GREEN . $message . RESET;
Show quoted text
> with the new way of using the Term::ANSIColor colored function like: > $msg = Term::ANSIColor::colored( $msg, $color );
Show quoted text
> from the documentation on Term::ANSIColor here: http://search.cpan.org/~rra/Term-ANSIColor-4.02/ANSIColor.pm > it seems colored() is supposed to add the reset for you.
Show quoted text
> "As an aid in resetting colors, colored() takes a scalar as the first > argument and any number of attribute strings as the second argument and > returns the scalar wrapped in escape codes so that the attributes will > be set as requested before the string and reset to normal after the > string."
What does $msg contain after that line? Does it end with the reset sequence? (\e[0m) -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
From nooneofconsequence [...] gmail.com Fri Aug 9 20: 24:05 2013
MIME-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
X-Spam-Status: No, score=-6.22 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-4.0.16-16681-1376090750-1462.87755-6-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.1508)
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-87755 [...] rt.cpan.org> <73F3C428-EB25-45F4-97B0-3A9B88DCAC02 [...] gmail.com> <rt-4.0.16-15305-1376089333-1956.87755-4-0 [...] rt.cpan.org> <87ob96xx8w.fsf [...] windlord.stanford.edu> <rt-4.0.16-16681-1376090750-1462.87755-6-0 [...] rt.cpan.org>
X-Virus-Checked: Checked
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.66.21.37 with SMTP id s5mr14103508pae.103.1376094233695; Fri, 09 Aug 2013 17:23:53 -0700 (PDT)
Content-Type: multipart/signed; boundary="Apple-Mail=_8642272B-7A7A-4BDC-84C2-9D98A080335B"; micalg="sha1"; protocol="application/pkcs7-signature"
Message-ID: <4BE1069C-B08C-4D65-9A33-AAB333DAB694 [...] gmail.com>
X-Spam-Score: -6.22
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D4BAE61E003 for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 20:24:05 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gZbBX4pdnXg0 for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 20:24:04 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 432FE2410C1 for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 20:24:04 -0400 (EDT)
Received: (qmail 4265 invoked by alias); 10 Aug 2013 00:24:03 -0000
Received: from mail-pd0-f171.google.com (HELO mail-pd0-f171.google.com) (209.85.192.171) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 09 Aug 2013 17:23:57 -0700
Received: by mail-pd0-f171.google.com with SMTP id g10so1167783pdj.30 for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 09 Aug 2013 17:23:54 -0700 (PDT)
Received: from [192.168.33.110] (ip72-199-172-9.sd.sd.cox.net. [72.199.172.9]) by mx.google.com with ESMTPSA id x8sm22512022pbb.39.2013.08.09.17.23.51 for <bug-Term-ANSIColor [...] rt.cpan.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 17:23:52 -0700 (PDT)
Delivered-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #87755] Log::Log4perl::Appender::ScreenColoredLevels no longer issues RESET
Return-Path: <nooneofconsequence [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=EkFD2chj+yqHjGDisev4Dq+l6NM8kWNXvt31wa6tMl8=; b=NT+3DxEsvCRBmxlpV/y7uv0nSjYGMUDcRp740NRprZWSyiQb5BBfoV4kNvzw9XtRQj rDC2XSQxtHjdrxnLTPB5XrmUWFopgpmshrg9IgelUwKqEwNX3AZj2acnTYA0JPELxiyr U3pBAZOVOROzMP/U0Sf0xkFMmOYIQEBbHk9vk6pnTN0yolb8IeWOL88YOtJ/JRDpiajj NGIKJBKA4Ii3+YUdfCkHrL2Ug3OQhoSOxf2F77+xlnJK9AL/KUmJFEyqrn3HYC9CxVGK nyONI9j4tCKLjnJmniCPS8fwpk+rMQbJg+t2XhBpm4hRe60Kea5xIzUS0KbfRW7H1nR6 hZUQ==
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
X-RT-Mail-Extension: term-ansicolor
Date: Fri, 9 Aug 2013 17:23:54 -0700
X-Spam-Level:
To: bug-Term-ANSIColor [...] rt.cpan.org
From: Michael Hicks <nooneofconsequence [...] gmail.com>
RT-Message-ID: <rt-4.0.16-23051-1376094246-1074.87755-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 2282
Download (untitled) / with headers
text/plain 2.2k
I added code to my log4perl installation to print $msg to a file and on inspecting that file with vim It looks to me like each lineends with: ^[[0m The lines start with: ^[[92m OR ^[[92m for different colors per my logging color settings, and In case it is relevant, my $TERM is set to xterm-256color I'm not sure if this is the same thing, but If I use tput to get the reset characters I normally use in my profile for coloring my prompt: red=$(tput setaf 1) green=$(tput setaf 2) blue=$(tput setaf 4) reset=$(tput sgr0) PS1="\[$red\]\u\[$reset\]@\[$green\]\h\[$reset\]:\[$blue\]\w\[$reset\]\$ " and put them in a file like so: reset=$(tput sgr0) && echo $reset | sudo tee -a reset.txt the file contains: ^[(B^[[m according to terminfo that sgr0 code is " exit_attribute_mode turn off all attributes". I'm not sure if this is the same reset that Term-ANSIColor uses. Michael Hicks nooneofconsequence@gmail.com Sometimes being wrong in interesting ways about interesting things is quite good for starting discussions. On Aug 9, 2013, at 4:25 PM, "rra@stanford.edu via RT" <bug-Term-ANSIColor@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87755 > > > "Michael Hicks via RT" <bug-Term-ANSIColor@rt.cpan.org> writes: >
>> I see that in the patch from issue 30899 which replaced the prior way of >> using Term::ANSIColor qw(:constants) and actually specifying the RESET >> in the formatting like:
>
>> return GREEN . $message . RESET;
>
>> with the new way of using the Term::ANSIColor colored function like: >> $msg = Term::ANSIColor::colored( $msg, $color );
>
>> from the documentation on Term::ANSIColor here: http://search.cpan.org/~rra/Term-ANSIColor-4.02/ANSIColor.pm >> it seems colored() is supposed to add the reset for you.
>
>> "As an aid in resetting colors, colored() takes a scalar as the first >> argument and any number of attribute strings as the second argument and >> returns the scalar wrapped in escape codes so that the attributes will >> be set as requested before the string and reset to normal after the >> string."
> > What does $msg contain after that line? Does it end with the reset > sequence? (\e[0m) > > -- > Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/> >
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64
Content-Length: 4139
Download smime.p7s
application/pkcs7-signature 4k

Message body not shown because it is not plain text.

From rra [...] stanford.edu Fri Aug 9 20: 47:30 2013
CC: undisclosed-recipients:;
MIME-Version: 1.0
X-Spam-Status: No, score=-5.656 tagged_above=-99.9 required=10 tests=[AWL=0.465, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-4.0.16-23051-1376094246-644.87755-5-0 [...] rt.cpan.org> (Michael Hicks via's message of "Fri, 9 Aug 2013 20:24:06 -0400")
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-87755 [...] rt.cpan.org> <73F3C428-EB25-45F4-97B0-3A9B88DCAC02 [...] gmail.com> <rt-4.0.16-15305-1376089333-1956.87755-4-0 [...] rt.cpan.org> <87ob96xx8w.fsf [...] windlord.stanford.edu> <rt-4.0.16-16681-1376090750-1462.87755-6-0 [...] rt.cpan.org> <4BE1069C-B08C-4D65-9A33-AAB333DAB694 [...] gmail.com> <rt-4.0.16-23051-1376094246-644.87755-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <877gfuxtgp.fsf [...] windlord.stanford.edu>
content-type: text/plain; charset="utf-8"
Organization: The Eyrie
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.656
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 483AF61E003 for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 20:47:30 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MbsKp9zJyDoK for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Fri, 9 Aug 2013 20:47:29 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id BC88E2410C1 for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 20:47:28 -0400 (EDT)
Received: (qmail 6941 invoked by alias); 10 Aug 2013 00:47:28 -0000
Received: from smtp1.Stanford.EDU (HELO smtp.stanford.edu) (171.67.219.81) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 09 Aug 2013 17:47:22 -0700
Received: from smtp.stanford.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 3A09314108D for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 17:47:19 -0700 (PDT)
Received: from windlord.stanford.edu (windlord.Stanford.EDU [171.67.225.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.stanford.edu (Postfix) with ESMTPS id 283C714108A for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 9 Aug 2013 17:47:19 -0700 (PDT)
Received: by windlord.stanford.edu (Postfix, from userid 1000) id F0C892F553; Fri, 9 Aug 2013 17:47:18 -0700 (PDT)
Delivered-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #87755] Log::Log4perl::Appender::ScreenColoredLevels no longer issues RESET
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Return-Path: <rra [...] stanford.edu>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
X-RT-Mail-Extension: term-ansicolor
Date: Fri, 09 Aug 2013 17:47:18 -0700
X-Spam-Level:
To: bug-Term-ANSIColor [...] rt.cpan.org
From: Russ Allbery <rra [...] stanford.edu>
RT-Message-ID: <rt-4.0.16-29857-1376095650-39.87755-0-0 [...] rt.cpan.org>
Content-Length: 702
Download (untitled) / with headers
text/plain 702b
"Michael Hicks via RT" <bug-Term-ANSIColor@rt.cpan.org> writes: Show quoted text
> Queue: Term-ANSIColor > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87755 >
Show quoted text
> I added code to my log4perl installation to print $msg to a file and on > inspecting that file with vim It looks to me like each lineends with:
Show quoted text
> ^[[0m
Given that, it seems like Term::ANSIColor is correct here. That's the reset sequence that clears all colors. (The 0 is optional.) So it seems like something else is going on here other than that line or the Term::ANSIColor behavior. Maybe some other part of the code isn't using colored correctly? -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
From nooneofconsequence [...] gmail.com Sat Aug 10 01: 55:15 2013
MIME-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
X-Spam-Status: No, score=-6.22 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-4.0.16-29857-1376095651-987.87755-6-0 [...] rt.cpan.org>
X-Mailer: Apple Mail (2.1508)
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-87755 [...] rt.cpan.org> <73F3C428-EB25-45F4-97B0-3A9B88DCAC02 [...] gmail.com> <rt-4.0.16-15305-1376089333-1956.87755-4-0 [...] rt.cpan.org> <87ob96xx8w.fsf [...] windlord.stanford.edu> <rt-4.0.16-16681-1376090750-1462.87755-6-0 [...] rt.cpan.org> <4BE1069C-B08C-4D65-9A33-AAB333DAB694 [...] gmail.com> <rt-4.0.16-23051-1376094246-644.87755-5-0 [...] rt.cpan.org> <877gfuxtgp.fsf [...] windlord.stanford.edu> <rt-4.0.16-29857-1376095651-987.87755-6-0 [...] rt.cpan.org>
X-Virus-Checked: Checked
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Received: by 10.68.196.167 with SMTP id in7mr14556145pbc.127.1376114101835; Fri, 09 Aug 2013 22:55:01 -0700 (PDT)
Content-Type: multipart/signed; boundary="Apple-Mail=_B9920443-F2A5-4B44-98A5-8ADAA9A8623C"; micalg="sha1"; protocol="application/pkcs7-signature"
Message-ID: <11EBEA20-93D4-403A-82CC-405054F0EBB3 [...] gmail.com>
X-Spam-Score: -6.22
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 224852410C2 for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Sat, 10 Aug 2013 01:55:15 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2PkOLkyQoqcw for <cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com>; Sat, 10 Aug 2013 01:55:13 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 4A251240F9B for <bug-Term-ANSIColor [...] rt.cpan.org>; Sat, 10 Aug 2013 01:55:13 -0400 (EDT)
Received: (qmail 27953 invoked by alias); 10 Aug 2013 05:55:12 -0000
Received: from mail-pa0-f50.google.com (HELO mail-pa0-f50.google.com) (209.85.220.50) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 09 Aug 2013 22:55:05 -0700
Received: by mail-pa0-f50.google.com with SMTP id fb10so5700153pad.37 for <bug-Term-ANSIColor [...] rt.cpan.org>; Fri, 09 Aug 2013 22:55:02 -0700 (PDT)
Received: from [192.168.42.129] (ip72-199-149-206.sd.sd.cox.net. [72.199.149.206]) by mx.google.com with ESMTPSA id eq5sm23896056pbc.15.2013.08.09.22.54.59 for <bug-Term-ANSIColor [...] rt.cpan.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 22:55:00 -0700 (PDT)
Delivered-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #87755] Log::Log4perl::Appender::ScreenColoredLevels no longer issues RESET
Return-Path: <nooneofconsequence [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=HuseVXYD00vrmJ9oRCTQrLrC9pvLE+yQf0FMu7fBNjg=; b=RdfiJ+ymIYFr/z0TKW2ZwKBtxyd/4glWq472Cs9bavpTn4ckUt1kNvmqa8IcWZSv9w FGV5x0qgaQrd6CtFhvSx+9fzAcpPE0y2Ia1oh5lHBv7TqNYpaeisc3AqSXdRSNGd5he8 zzU1C6zGa2gw1TyBw51lGPjaLkDdOrBsP0GOC+fDXjFT6ZjTXLdtncxZS6h4HCbCZVAp gausjsa+H5W5No+uulQgWOaeV2h7AClpCdw1a2WHt5svYSUTbEqx/LmjDkyQAkEt3Vzl 1qIBw0zSHLRMU9WMb5xCourR0lH1D1XlJctgwFb+8YuKbdx2TXU5RmeQebegg035qd7Y Apfw==
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+Term-ANSIColor [...] hipster.bestpractical.com
X-RT-Mail-Extension: term-ansicolor
Date: Fri, 9 Aug 2013 22:55:02 -0700
X-Spam-Level:
To: bug-Term-ANSIColor [...] rt.cpan.org
From: Michael Hicks <nooneofconsequence [...] gmail.com>
RT-Message-ID: <rt-4.0.16-12654-1376114115-709.87755-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 1651
Download (untitled) / with headers
text/plain 1.6k
I dug into this a bit more and hypothesized that it could be my using Data::Dumper with objects in the output colored by Term-ANSIColor inside log4perl that was causing the problem due to the objects being strings that have newline chars in them. When I ran my program with log4perl set to a logging level that didn't dump any objects, the phenomenon didn't occur. so I tried setting $Term::ANSIColor::EACHLINE = "\n"; In the parent program and the problem went away even at the logging level dumping objects. I'll submit this as a documentation addendum to the log4perl folks. Thanks for your time, Michael Hicks nooneofconsequence@gmail.com Sometimes being wrong in interesting ways about interesting things is quite good for starting discussions. On Aug 9, 2013, at 5:47 PM, rra@stanford.edu via RT <bug-Term-ANSIColor@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87755 > > > "Michael Hicks via RT" <bug-Term-ANSIColor@rt.cpan.org> writes: >
>> Queue: Term-ANSIColor >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=87755 >
>
>> I added code to my log4perl installation to print $msg to a file and on >> inspecting that file with vim It looks to me like each lineends with:
>
>> ^[[0m
> > Given that, it seems like Term::ANSIColor is correct here. That's the > reset sequence that clears all colors. (The 0 is optional.) So it seems > like something else is going on here other than that line or the > Term::ANSIColor behavior. Maybe some other part of the code isn't using > colored correctly? > > -- > Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/> >
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64
Content-Length: 4139
Download smime.p7s
application/pkcs7-signature 4k

Message body not shown because it is not plain text.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.