Não é nativo com a Diretiva ErrorLog.
O que eu gostaria de fazer é escrever um script que faça a solução para você e canalize o ErrorLog através disso. Na sua configuração do apache, algo assim:
Errorlog "|/usr/local/bin/errorlog_resolver.pl"
E, em seguida, um exemplo de script Perl:
#!/usr/bin/perl -w
# errorlog_resolver.pl
# Give apache ErrorLog on STDIN, outputs them with numeric IP addresses
# in the likely (host) field converted to hostnames (where possible).
# based on clf_lookup.plx from "Perl for Web Site Management"
# http://oreilly.com/catalog/perlwsmng/chapter/ch08.html
#
use strict;
use Socket;
open LOGFILE, ">>/tmp/my_error_log" or die "Couldn't open file: $!";
my %hostname;
while (<>) {
my $line = $_;
my($day, $month, $dayn, $hour, $year, $err, $client, $host, $rest) = split / /, $line, 9;
if ( $client ~~ "[client" ) {
# remove the ] trailing the likely ip-address.
my $chr = chop($host);
if ($host =~ /^\d+\.\d+\.\d+\.\d+$/) {
# looks vaguely like an IP address
unless (exists $hostname{$host}) {
# no key, so haven't processed this IP before
$hostname{$host} = gethostbyaddr(inet_aton($host), AF_INET);
}
if ($hostname{$host}) {
# only processes IPs with successful lookups
$line = "$day $month $dayn $hour $year $err $client $hostname{$host}\($host\)\] $rest)";
}
}
}
print LOGFILE $line;
}