Questions tagged [log4perl]

Log::Log4perl is a Perl module that lets you remote-control and fine-tune the logging behaviour of your system from the outside.

Log::Log4perl lets you remote-control and fine-tune the logging behaviour of your system from the outside. It implements the widely popular (Java-based) log4j logging package in pure Perl.

111 questions
1
vote
1 answer

How to install Log4perl module using Jenkins

I am very new to Jenkins and Perl and I am trying to install Log4perl module using Jenkin Job. Below is the command which I have used in Jenkin's Execute shell box perl -MCPAN -e 'install Log::Log4Perl' And below is the Jenkin console log…
1
vote
1 answer

How can I use a Perl variable in my Log::Log4perl config file?

I would like to use a Perl variable from my script in a Log::Log4perl config file. I read the documentation and found that I can use a subroutine, but I would like to do it a little bit simpler, if possible. I want to set the filename for my…
averlon
  • 325
  • 3
  • 14
1
vote
2 answers

Directing significant-event messages to a separate Log::Log4perl logger

I need to collect significant-event messages to a separate log file. (The regular log is rather bloated, and meant for maintenance, while the user is only interested in very few events.) The events are not level related, although all ERROR level and…
MeirG
  • 333
  • 2
  • 14
1
vote
2 answers

How do I send log4perl log messages to Amazon Cloudwatch?

I have a Perl/Plack/Postgres/Linux web application that runs on an Amazon EC2 instance. I'm about to start running it on multiple instances, behind a load balancer, so I need a way to gather together the application's log messages into a single…
rohanc
  • 525
  • 6
  • 12
1
vote
1 answer

Catalyst Log4perl: configure config file location from app config

In a Catalyst app, I need to specify the Log4perl's config file location. All the examples I could find suggest that I should do that from code. However, I would like to be able to specify it in the app config file. This would allow me to use…
Andrey Ch
  • 193
  • 1
  • 12
1
vote
1 answer

Dynamically Change email config for Log::Dispatch::Email::MailSender

I have switched my loggin to use Log::Log4perl and Im having a hard time using Log::Dispatch::Email::MailSender for emailing logs. The code snippet below is my working example. use Log::Log4perl qw(get_logger :levels); my…
1
vote
0 answers

Convert log4j config to log4perl config

How do I convert following log4j config to log4perl config log4j.appender.graylog2 = org.graylog2.log.GelfAppender log4j.appender.graylog2.graylogHost = somehostname log4j.appender.graylog2.graylogPort = XXXX #…
Abhijeet
  • 266
  • 1
  • 3
  • 13
1
vote
1 answer

How do I make my Log::Log4perl logger work?

Here's the code I have: use strict; use warnings; use Log::Log4perl qw(:easy); Log::Log4perl->init({ level => $DEBUG }); my $logger = Log::Log4perl->get_logger("my.logger"); my $appender =…
Geo
  • 93,257
  • 117
  • 344
  • 520
1
vote
1 answer

How can I buffer logging across requests - Perl, log4Perl

I am looking for a way to only catch specific issues that occur after a certain threshold, over a given time frame. e.g. My web applications uses a set of keys send over POST I am whitelisting the keys so I am only looking for specific keys within…
Gratus D.
  • 787
  • 7
  • 22
1
vote
1 answer

Perl Error with Log::Log4perl::Appender::File

I am trying to build application with the help of Perl. The application consists of Thread::Pool and Log4Perl packages from perl. When i exclude package Thread::Pool logging works. But when i include it it gives me error as following: ERROR: can't…
Sanjay Bhosale
  • 685
  • 2
  • 8
  • 18
1
vote
1 answer

Log::Log4Perl screen logger stops working after creating a file logger

I have a Perl program in which I have to have one set of messages go to the screen (stdout) and another set go to a file. I create two loggers for each of those outputs: the screen logger first, then the file logger. When I create the screen logger…
parramorej
  • 33
  • 4
1
vote
1 answer

Using root logger across multiple modules

ActiveState Perl 5.12 on WinXP I've recently become a convert to Log4perl and used it successfully where I defined a specific logger for each module that makes up my application. Example: Upload.pm----- my $logger = get_logger("Upload"); # specific…
user1201168
  • 415
  • 6
  • 19
1
vote
1 answer

View content of Log::Log4perl log file while logger is running

I'm building a Server-Client app with Perl/Mojolicious and JQuery. The server generates a log file using the Log::Log4perl and send the log file name back to the client so the client can see the progress. In the client I use a regular HTML A link to…
iseif
  • 297
  • 2
  • 14
1
vote
0 answers

Log4perl problems on Ubuntu Server

I have been running a large-ish site for years, with a typical nginx / apache setup, and all the "pages" are mod_perl. Up until recently, I was running on FreeBSD. After a hardware-replacement, and due to other reasons, I was forced to migrate to…
Spinner
  • 11
  • 2
1
vote
1 answer

$@ gets set differently on eval and Log::Dispatch::Email

I use Log4perl in one of my applications and created my own appender which inherits from Log::Dispatch::Email because I need some special handling of sendmail. This appender worked for some years now, but today I recognized some weird behavior in…
Thorsten Schöning
  • 3,501
  • 2
  • 25
  • 46