Re: How to write IDL log output to a file? [message #53973] |
Wed, 09 May 2007 16:55 |
Write2Irina
Messages: 2 Registered: May 2007
|
Junior Member |
|
|
On May 9, 3:45 pm, Christopher Thom <c...@oddjob.uchicago.edu> wrote:
> Quoth Benjamin Hornberger:
>
>> Write2Ir...@gmail.com wrote:
>>> Hello all,
>
>>> Does anybody knows how to copy output that goes to the IDLDE log panel
>>> to a file? Any ideas will be greatly appreciated.
>
>> Have a look at the JOURNAL procedure!
>
> And you can even set this up to work semi-automagically. at the start of
> my idl.startup file, I have the following:
>
> -------
> logdate=string(strmid(systime(0),8,2),format='(i2.2)')+strmi d(systime(0),4,3)+strmid(systime(0),22,2)
> logfile = '~/idl/log/idllog-'+logdate
> if file_test(logfile) then print,'Log file found. no logging'
> if not file_test(logfile) then print,'Beginning log file...' & journal,logfile
> --------
>
> I then have a preference set for idl (in
> .idl/rsi/pref-10-idl_6_3-unix/idl.pref) that reads the idl.startup file
> every time I start idl, so I get logs of all my sessions.
>
> Note that this is a somewhat crude solution...if you start a session more
> than once per day, all subsequent sessions are not logged (file already
> exists)...but I tend to start a session every week or so, so that's not a
> huge issue for me.
>
> cheers
> chris
>
> ps -- OH! I just saw "IDLDE"...I didn't realise anyone actually used that.
> All my stuff is set up for terminal operation, but I imagine it should
> work from IDLDE too.
Thanks to everyone, JOURNAL works perfectly for me!
|
|
|
Re: How to write IDL log output to a file? [message #53975 is a reply to message #53973] |
Wed, 09 May 2007 15:45  |
Christopher Thom
Messages: 66 Registered: October 2006
|
Member |
|
|
Quoth Benjamin Hornberger:
> Write2Irina@gmail.com wrote:
>> Hello all,
>>
>> Does anybody knows how to copy output that goes to the IDLDE log panel
>> to a file? Any ideas will be greatly appreciated.
>>
>
> Have a look at the JOURNAL procedure!
And you can even set this up to work semi-automagically. at the start of
my idl.startup file, I have the following:
-------
logdate=string(strmid(systime(0),8,2),format='(i2.2)')+strmi d(systime(0),4,3)+strmid(systime(0),22,2)
logfile = '~/idl/log/idllog-'+logdate
if file_test(logfile) then print,'Log file found. no logging'
if not file_test(logfile) then print,'Beginning log file...' & journal,logfile
--------
I then have a preference set for idl (in
.idl/rsi/pref-10-idl_6_3-unix/idl.pref) that reads the idl.startup file
every time I start idl, so I get logs of all my sessions.
Note that this is a somewhat crude solution...if you start a session more
than once per day, all subsequent sessions are not logged (file already
exists)...but I tend to start a session every week or so, so that's not a
huge issue for me.
cheers
chris
ps -- OH! I just saw "IDLDE"...I didn't realise anyone actually used that.
All my stuff is set up for terminal operation, but I imagine it should
work from IDLDE too.
|
|
|
|
|