Isotropix Forums

"cnode -log_width" broken?

Clarisse Scripting related topics

"cnode -log_width" broken?

Unread postby aseiden » Tue Apr 07, 2015 6:46 pm

Whenever I run cnode scripts, any printed output seems to wrap at 80 columns, no matter what the setting of the log_width flag:

Code: Select all
00:00:00        44/47MB  CNode licensing up and running.
00:00:00        44/47MB  Running script file '/nethome/aseiden/afd/bug/bbox_ch
                         eck.py'                                             
00:00:00        65/92MB  Successfully loaded 5 object(s) in 2 context(s) from
                         project file 'broke_awning.project' in 0.003 s.     
00:00:00        65/92MB  project://prop_awningChinese_A_OUT                   
00:00:00        66/92MB  (0.0879054218530655, -0.027130126953125, -0.053340911
                         8652344)                                             


Also, is there a way to suppress the time/memory usage, and the notices such as "Running script file ..." and "Successfully loaded ..."? I would think this stuff would show up only in -verbose mode; but the presence or absence of -verbose seems to have no effect.

This is running on RHEL 6.2, using cnode 2.0 RC13. I've also tried RC12 and RC9, and they have the same issue.
aseiden
 
Posts: 28
Joined: Tue Mar 31, 2015 11:23 pm

Re: "cnode -log_width" broken?

Unread postby guillaume » Wed Apr 08, 2015 1:50 pm

Hi,

It's possible to suppress the time/memory usage with the parameter "-disable_trace_logger" but the log width limit is disabled.
However, -log_width limit works fine in here. Could you please provide a command line example where it fails?
Thanks,
Guillaume
Isotropix
R&D Engineer
User avatar
guillaume
 
Posts: 140
Joined: Fri Feb 01, 2013 12:14 pm

Re: "cnode -log_width" broken?

Unread postby miker » Wed Apr 08, 2015 4:47 pm

I'm seeing the same thing. Given a script 'test.py' containing only "print '1234567890'*10", I get this:

Code: Select all
~> cnode -script test.py
00:00:00        42/47MB  CNode licensing up and running.
00:00:00        43/47MB  Running script file 'test.py'
00:00:00        92/92MB  12345678901234567890123456789012345678901234567890123
                         4567890123456789012345678901234567890123456789000:00:00        92/92MB 

~> cnode -log_width 0 -script test.py
00:00:00        42/47MB  CNode licensing up and running.
00:00:00        43/47MB  Running script file 'test.py'
00:00:00        92/92MB  12345678901234567890123456789012345678901234567890123
                         4567890123456789012345678901234567890123456789000:00:00        92/92MB 

~> cnode -log_width 100 -script test.py
00:00:00        42/47MB  CNode licensing up and running.
00:00:00        43/47MB  Running script file 'test.py'
00:00:00        92/92MB  12345678901234567890123456789012345678901234567890123
                         4567890123456789012345678901234567890123456789000:00:00        92/92MB


Note that the trailing newline from the print statement is lost. Same results for any value of -log_width. However, if I then add "-disable_trace_logger", the line is never wrapped, no matter what value of -log_width I give it.

To be honest, this is much preferable. It's generally bad practice for a tool to line-wrap its own log output. Maybe it would be better if the 'trace logger' output its information on separate lines instead of in columns?

-miker
miker
 
Posts: 97
Joined: Wed Oct 22, 2014 2:51 am

Re: "cnode -log_width" broken?

Unread postby aseiden » Wed Apr 08, 2015 6:41 pm

guillaume wrote:It's possible to suppress the time/memory usage with the parameter "-disable_trace_logger" but the log width limit is disabled.


Thanks, "-disable_trace_logger" does everything I need! Gets rid of the time/memory stuff and the log wrapping at the same time.
Perhaps it should be added to the "cnode -help" listing?

Like miker says, any script, even the most trivial, displays the behavior where log_width is ignored.
aseiden
 
Posts: 28
Joined: Tue Mar 31, 2015 11:23 pm


Return to Scripting