logger

How do I...?
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: logger

Post by joleenf »

Hi,

I tested a simple problem on a machine via an ssh tunnel:

Code: Select all

c=1 
a=b*c


This produces a traceback in the McIDAS-V jython shell run through a window manager and vncserver:
Screen Shot 2017-02-15 at 9.20.07 AM.png
Screen Shot 2017-02-15 at 9.20.07 AM.png (8.47 KiB) Viewed 2451 times


I placed this code in a short script called "testError.py"

When I run this problem using python in a xterm, I see the NameError in the terminal:
python testError.py

returns:
Traceback (most recent call last):
File "../mcv_python/testerror.py", line 3, in <module>
a=b*c
NameError: name 'c' is not defined


I then used a simple background script to run the McIDAS-V libraries (mcvinit.sh) and this displays the Traceback as well.

However, when I start a vncserver from a script, and run McIDAS-V within the vncserver, the error does not print. This became a problem when I was trying to produce some images and failed to see a traceback error. The script just hangs.

Examples of the VNC scripts are at
ftp://ftp.ssec.wisc.edu/pub/ssec/joleenf/

Do you know where the traceback error might be found?
Thanks,
Joleen
User avatar
Jon
Posts: 192
Joined: Fri Jan 09, 2009 8:44 pm
Location: Madison, WI

Re: logger

Post by Jon »

Hi Joleen,

I keep trying and failing to make progress here, but I just wanted to say that this hasn't been forgotten. To be extra certain, I also added this to the Inquiry System (#2507).

Apologies for not following up on this in a more timely manner; I kept holding off in the hopes that I'd make some progress. :oops:
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: logger

Post by joleenf »

Hi Jon,


DavidH found this

https://github.com/TigerVNC/tigervnc/issues/210

This might explain why argparse information disappears. RayG just suggested writing logger output to a file. As long as there are no errors in argparse, he notes that I should be able to redirect other logger messages to a text file.

This is not really a complete answer, but maybe just a little closer to an answer than before. I am using TigerVNC on the liunx box.

Joleen
User avatar
joleenf
Posts: 1123
Joined: Mon Jan 19, 2009 7:16 pm

Re: logger

Post by joleenf »

Hi,

In the case where the argparse message which indicates the supplied parameter is invalid being "lost":

~/McIDAS-V-System/runMcV -script ~/code/goesrImg/test/testargparse.py -scriptargs --food


(where the only option flag is --outputDir),

I believe the message is sent to an archived log:
~/McIDAS-V/archived_logs/mcidasv_<ccyymmdd>_<hhmmss>.log

Next, for a python log message using the logger, using a FileHandler rather than a StreamHandler, sends the logging messages to a specified file.

Joleen
Post Reply