Skip Menu |
 

This queue is for tickets about the Net-Server CPAN distribution.

Report information
The Basics
Id: 34471
Status: patched
Priority: 0/
Queue: Net-Server

People
Owner: Nobody in particular
Requestors: MARKOV [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.97
Fixed in: (no value)



Subject: Type of started daemon incorrectly shown
Download (untitled) / with headers
text/plain 881b
Net/Server.pm line 343 says my $ns_type = (! $super || $ref eq $super) ? '' : " (type $super)"; $self->log(2,$self->log_time ." ". ref($self) .$ns_type. " starting! pid($$)"); In my log-file, this shows up like Mar 27 14:11:47 earth server.pl[29586]: 2008/03/27-14:11:47 XML::Compile::SOAP::HTTPDaemon (type XML::Compile::SOAP::Daemon) starting! pid(29586) As you see, the - time is shown twice - the process-id is shown twice - the type of daemon is incorrect I think that process-id and time should be added by the log() method for each recorded line, if it does not log to syslog. Besides, the super of my class is also defined by myself... I think there is a need for a type method, such that you can say $daemon->type. So, I would prefer a log-line like this: Mar 27 14:11:47 earth server.pl[29586]: daemon My::Daemon (type PreFork) started with 10 childs
Download (untitled) / with headers
text/plain 1.3k
Though not documented, there is now a net_server_type and a _server_type method. The net_server_type will be the server flavor running. The _server_type defaults to ref($self) but can be overridden. The code is updated as of the just released version 2.000 As for the logfile format, that will be reviewed and will likely come in a future release. On Thu Mar 27 09:33:13 2008, MARKOV wrote: Show quoted text
> Net/Server.pm line 343 says > > my $ns_type = (! $super || $ref eq $super) ? '' : " (type $super)"; > $self->log(2,$self->log_time ." ". ref($self) .$ns_type. " starting! > pid($$)"); > > In my log-file, this shows up like > > Mar 27 14:11:47 earth server.pl[29586]: 2008/03/27-14:11:47 > XML::Compile::SOAP::HTTPDaemon (type XML::Compile::SOAP::Daemon) > starting! pid(29586) > > As you see, the > - time is shown twice > - the process-id is shown twice > - the type of daemon is incorrect > > I think that process-id and time should be added by the log() method for > each recorded line, if it does not log to syslog. > > Besides, the super of my class is also defined by myself... I think > there is a need for a type method, such that you can say $daemon->type. > > So, I would prefer a log-line like this: > > Mar 27 14:11:47 earth server.pl[29586]: daemon My::Daemon (type > PreFork) started with 10 childs


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.