Re: $stderr

Paul Vudmaska <[email protected]>
Newsgroups gmane.comp.apache.mod-ruby
Organization Integrated Internet
Message-ID <[email protected]>
Jeffrey Dik wrote:

>Hi,
>
>Even when using mod_ruby, $stderr's file descriptor is still 2, but
>that's not what your looking for :-)
>  
>
That joke went right over my not too smart about this stuff head :)

>One way to write to the apache logs is to use the log_alert, log_crit,
>log_debug, log_emerg, log_error, log_info, log_notice, and log_warn
>methods for an Apache::Server object.  Use these methods like you would
>use printf.  Here's a link to the appropriate documentation:
>
>http://modruby.net/doc/classes.en.html#label-249
>
>This works for me:
>r = Apache.request
>s = r.server
>
>s.log_error("This is a %s", 'test')
>
>  
>
Works like a champ - precisely what i was looking for!
Thanks, Jeffrey
:Paul

>Hope that helps,
>Jeff
>
>On Fri, May 28, 2004 at 11:23:33PM -0500, Paul Vudmaska wrote:
>  
>
>>Hello,
>>
>>In the context of mod_ruby - where is $stderr.write writing to? If i'm 
>>not mistaken not to the apache logs - i've looked there. Is there a way to 
>>write to that log?. 
>>Forgive me if this is a stupid question.
>>
>>
>>
>>Thanks,Paul
>>
>>
>>
>>
>>    
>>
>
>  
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.