Subject: Developers of Sympa
List archive
Re: [sympa-developpers] [sympa-commits] sympa[8082] branches/sympa-6.2-branch/src/lib/Log.pm: [feature] Log::do_log (): Truncate long strings.
- From: IKEDA Soji <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-developpers] [sympa-commits] sympa[8082] branches/sympa-6.2-branch/src/lib/Log.pm: [feature] Log::do_log (): Truncate long strings.
- Date: Wed, 5 Dec 2012 00:57:41 +0900
On Tue, 04 Dec 2012 16:13:16 +0100
David Verdin <address@concealed> wrote:
> Hi Soji,
>
> I'm not sure about this. Why should we limit the logs length?
> Sometimes, we will have long data to log and logs will be useless
> without them.
Hmm, I was probablly overdone. I feel it is not neccessary to log
such as entire message or handreds of e-mails.
Anyway I'll revert it at the present.
> Cheers,
Cheers,
> David
--- Soji
> Le 04/12/12 06:58, address@concealed a écrit :
> > sympa[8082] branches/sympa-6.2-branch/src/lib/Log.pm: [feature]
> > Log::do_log(): Truncate long strings.
> >
> > Revision
> > 8082
> > Author
> > sikeda
> > Date
> > 2012-12-04 06:58:53 +0100 (mar. 04 déc. 2012)
> >
> >
> > Log Message
> >
> > [feature] Log::do_log(): Truncate long strings.
> >
> >
> > Modified Paths
> >
> > * branches/sympa-6.2-branch/src/lib/Log.pm
> > <#branchessympa62branchsrclibLogpm>
> >
> >
> > Diff
> >
> >
> > Modified: branches/sympa-6.2-branch/src/lib/Log.pm (8081 => 8082)
> >
> >
> > --- branches/sympa-6.2-branch/src/lib/Log.pm 2012-12-04 05:44:18
> > UTC (rev 8081)
> > +++ branches/sympa-6.2-branch/src/lib/Log.pm 2012-12-04 05:58:53
> > UTC (rev 8082)
> > @@ -96,7 +96,7 @@
> > $level = 'info';
> > }
> >
> > - # do not log if log level if too high regarding the log requested by
> > user
> > + # do not log if log level is too high regarding the log requested by
> > user
> > return if defined $log_level and $levels{$level} > $log_level;
> > return if ! defined $log_level and $levels{$level} > 0;
> >
> > @@ -121,11 +121,13 @@
> > push @param, sprintf('%s <%s>', ref $p, $p->get_id);
> > } else {
> > push @param, ref $p;
> > - }
> > + }
> > + } elsif (length $p > 100) {
> > + push @param, substr($p, 0, 86) . '...(truncated)';
> > } else {
> > push @param, $p;
> > + }
> > }
> > - }
> >
> > ## Determine calling function
> > my $caller_string;
>
--
株式会社 コンバージョン セキュリティ&OSSソリューション部 池田荘児
〒231-0004 神奈川県横浜市中区元浜町3-21-2 ヘリオス関内ビル7F
e-mail address@concealed TEL 045-640-3550
http://www.conversion.co.jp/
-
Re: [sympa-developpers] [sympa-commits] sympa[8082] branches/sympa-6.2-branch/src/lib/Log.pm: [feature] Log::do_log (): Truncate long strings.,
David Verdin, 12/04/2012
- Re: [sympa-developpers] [sympa-commits] sympa[8082] branches/sympa-6.2-branch/src/lib/Log.pm: [feature] Log::do_log (): Truncate long strings., IKEDA Soji, 12/04/2012
Archive powered by MHonArc 2.6.19+.