==== found a solution ==== thanks to daxim i wrote my own appender. Here is the source
-generate a perl package with the following code
package Log4PerlOutputDebugStringAppender;
sub new {
my($class, %options) = @_;
my $self = { %options };
bless $self, $class;
return $self;
}
sub log {
my($self, %params) = @_;
use Win32::API::OutputDebugString qw(OutputDebugString DStr);
OutputDebugString( "$params{message}" );
}
1;
-generate a Log4Perl config file with the following
log4perl.logger = INFO, OutputDebugString
log4perl.appender.OutputDebugString=Log4PerlOutputDebugStringAppender
log4perl.appender.OutputDebugString.layout=Log::Log4perl::Layout::PatternLayout
log4perl.appender.OutputDebugString.layout.ConversionPattern=[%-5p] %-15.15c{1} (%4L) - %m%n
-initialize the logger in your Perl script
use Log::Log4perl qw(:easy);
Log::Log4perl->init("logconf.txt");
INFO("INFO");
WARN("WARN");
FATAL("FATAL");
Et voilà - all logging messages go through OutputDebugStrings
Thanks daxim for help.