Re: mod_perl startup script and logging

André Warnier (tomcat) <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Sorry, never mind, found it :

	my $server = Apache2::ServerUtil->server();
	my $apache_version = Apache2::ServerUtil::get_server_version();
	$server->log_error("mp2-startup: server version is " . $apache_version);

On 10.04.2016 16:48, André Warnier (tomcat) wrote:
> Hi.
> Linux Debian
> Apache httpd 2.4
> mod_perl 2.0.9
>
> ...
> PerlPostConfigRequire "/etc/apache2/modperl2_startup.pl"
> ...
>
> modperl2_startup.pl contains the usual "use" directives, including
>    use Apache2::ServerRec ();
>    use Apache2::ServerUtil ();
>    use Apache2::Log ();
>
> If in this script, I would like to log something to the Apache server log (error_log), how
> do I do that ?
> (I mean e.g., how can I get the server object, from inside modperl2_startup.pl ?)
>
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.