You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/05/03 18:11:14 UTC

svn commit: r1333523 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py

Author: stsp
Date: Thu May  3 16:11:13 2012
New Revision: 1333523

URL: http://svn.apache.org/viewvc?rev=1333523&view=rev
Log:
* subversion/tests/cmdline/svntest/main.py: Stop showing the log level of each
   line in the log. It clutters the output and makes it hard to copy/paste
   test output for reuse during test development.

Modified:
    subversion/trunk/subversion/tests/cmdline/svntest/main.py

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1333523&r1=1333522&r2=1333523&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Thu May  3 16:11:13 2012
@@ -81,7 +81,7 @@ default_num_threads = 5
 # Set up logging
 logger = logging.getLogger()
 handler = logging.StreamHandler(sys.stdout)
-formatter = logging.Formatter('[%(levelname)s] %(message)s')
+formatter = logging.Formatter('%(message)s')
 handler.setFormatter(formatter)
 logger.addHandler(handler)
 
@@ -1685,7 +1685,7 @@ def execute_tests(test_list, serial_only
     parser = _create_parser()
 
   if options.log_with_timestamps:
-    formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(message)s',
+    formatter = logging.Formatter('[%(asctime)s] %(message)s',
                                   '%Y-%m-%d %H:%M:%S')
     handler.setFormatter(formatter)
 



Re: svn commit: r1333523 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py

Posted by Stefan Sperling <st...@elego.de>.
On Thu, May 03, 2012 at 03:02:07PM -0400, Greg Stein wrote:
> On Thu, May 3, 2012 at 3:00 PM, Stefan Sperling <st...@elego.de> wrote:
> > On Thu, May 03, 2012 at 02:54:02PM -0400, Greg Stein wrote:
> >> Other possibilities might be something like:
> >>
> >> E: error message here
> >> W: warning message here
> >
> > I'd be fine with this because this way most lines will still be less
> > than 80 coloums in length.
> 
> C: critical
> I: info
> D: debug
> 
> Seem about right?

Looks good to me.

> (I'll wing it for "NOTSET" and the numeric values in
> between the above, unless you have other requests)

I doubt we need any more log levels than the standard logger provides.
I suppose we should disallow numerical input for the --set-log-level
option until we find a pressing need to have more than 5 log levels.

Re: svn commit: r1333523 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py

Posted by Greg Stein <gs...@gmail.com>.
On Thu, May 3, 2012 at 3:00 PM, Stefan Sperling <st...@elego.de> wrote:
> On Thu, May 03, 2012 at 02:54:02PM -0400, Greg Stein wrote:
>> Other possibilities might be something like:
>>
>> E: error message here
>> W: warning message here
>
> I'd be fine with this because this way most lines will still be less
> than 80 coloums in length.

C: critical
I: info
D: debug

Seem about right? (I'll wing it for "NOTSET" and the numeric values in
between the above, unless you have other requests)

Cheers,
-g

Re: svn commit: r1333523 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py

Posted by Stefan Sperling <st...@elego.de>.
On Thu, May 03, 2012 at 02:54:02PM -0400, Greg Stein wrote:
> Other possibilities might be something like:
> 
> E: error message here
> W: warning message here

I'd be fine with this because this way most lines will still be less
than 80 coloums in length.

Re: svn commit: r1333523 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py

Posted by Greg Stein <gs...@gmail.com>.
On Thu, May 3, 2012 at 12:11 PM,  <st...@apache.org> wrote:
> Author: stsp
> Date: Thu May  3 16:11:13 2012
> New Revision: 1333523
>
> URL: http://svn.apache.org/viewvc?rev=1333523&view=rev
> Log:
> * subversion/tests/cmdline/svntest/main.py: Stop showing the log level of each
>   line in the log. It clutters the output and makes it hard to copy/paste
>   test output for reuse during test development.

I disagree with this change. It is now "impossible" to figure out the
loglevel for a message, to determine whether it is informational...
debug... warning, etc. And based on knowing that, how I would need to
adjust the loglevel for another run.

If you really don't want it in there, then I would suggest a default
of displaying it, and a flag to disable the loglevels.

Other possibilities might be something like:

E: error message here
W: warning message here

Or spelled out a bit more: ERR: WARN:, etc. If you want a custom
format, then I'd be happy to code a custom formatter if you define the
desired output.

Thanks,
-g