Page 1 of 1 1
Topic Options
#132285 - 2005-01-11 10:50 PM support for crash messages in redirectoutput()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
like in dos one can redirect command output to file and also decide if he wants to redirect errors too...
that 2&1> pipe thing.

why not add same thing to redirectoutput()?
something like:
redirectoutput("c:\myOutputFile.txt",0) ;New output data appended to the existing contents of file.
redirectoutput("c:\myOutputFile.txt",1) ;file overwritten with the redirected output.
redirectoutput("c:\myOutputFile.txt",2) ;same as 0 but also error/crash message included.
redirectoutput("c:\myOutputFile.txt",3) ;same as 1 but also error/crash message included.
redirectoutput("c:\myOutputFile.txt",4) ;New error/crash message appended to file.
redirectoutput("c:\myOutputFile.txt",5) ;file overwritten with the New error/crash message.
_________________________
!

download KiXnet

Top
#132286 - 2005-01-12 09:31 AM Re: support for crash messages in redirectoutput()
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Probably simpler to have
Code:
RedirectErrors($sFile,$sMode)



Personally, I'd prefer to log serious script failures to the application event log. I don't see why this shouldn't be activated all the time where supported, but for those who are paranoid:
Code:
$=SetOption("EventLogErrors","OFF")



Of course this is not available with Win9x, but that is becoming less of a problem.

Top
#132287 - 2005-01-12 09:53 AM Re: support for crash messages in redirectoutput()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I was thinking about that redirectErrors() and indeed it would be simpler and cleaner approach.

also that eventlog option is really welcome.
don't wanna have all those red alerts in eventlog just because kixtart fails to connect to DC on standalone machine.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 494 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.129 seconds in which 0.067 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org