comp.lang.ada
 help / color / mirror / Atom feed
* Redirecting Standard Error...
@ 2002-08-03  4:27 John M. Resler
  2002-08-05 15:41 ` Stephen Leake
  0 siblings, 1 reply; 2+ messages in thread
From: John M. Resler @ 2002-08-03  4:27 UTC (permalink / raw)


I have written an asis application that generates a lot of messages to 
standard error that are not pertinent to my application but nonetheless 
unsightly. I have attempted to redirect standard_error with the 
following lines to a log file and receive no exceptions but the asis 
initialization, association and open procedures continue to generate the 
standard_error output. Can anyone tell me over and above what I am 
doing, how I might get around this?

    -- code here for testing if file exists already, etc.
    -- redirect standard_error
    Ada.Wide_Text_IO.Open( File => Warnings_File,
                           Mode => Ada.Wide_Text_IO.Append_File,
                           Name => "asis_warnings.txt" );

    Ada.Wide_Text_IO.Set_Error( File => Warnings_File );

    -- initialize the asis environment
    Asis.Implementation.Initialize;
    Asis.Ada_Environments.Associate ( The_Context, "The_Context", "-CA");
    Asis.Ada_Environments.Open ( The_Context );




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Redirecting Standard Error...
  2002-08-03  4:27 Redirecting Standard Error John M. Resler
@ 2002-08-05 15:41 ` Stephen Leake
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Leake @ 2002-08-05 15:41 UTC (permalink / raw)


"John M. Resler" <John-Resler@cox.net> writes:

> I have written an asis application that generates a lot of messages to
> standard error that are not pertinent to my application but
> nonetheless unsightly. I have attempted to redirect standard_error
> with the following lines to a log file and receive no exceptions but
> the asis initialization, association and open procedures continue to
> generate the standard_error output. Can anyone tell me over and above
> what I am doing, how I might get around this?

It may be that ASIS is using Ada.Text_IO for standard error, rather
than Ada.Wide_Text_IO; I have not checked.

> 
> 
>     -- code here for testing if file exists already, etc. --
>     redirect standard_error Ada.Wide_Text_IO.Open( File =>
>     Warnings_File, Mode => Ada.Wide_Text_IO.Append_File, Name =>
>     "asis_warnings.txt" );
> 
>     Ada.Wide_Text_IO.Set_Error( File => Warnings_File );
> 
>     -- initialize the asis environment
>     Asis.Implementation.Initialize;
>     Asis.Ada_Environments.Associate ( The_Context, "The_Context", "-CA");
>     Asis.Ada_Environments.Open ( The_Context );
> 

-- 
-- Stephe



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-05 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-03  4:27 Redirecting Standard Error John M. Resler
2002-08-05 15:41 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox