Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Starman CPAN distribution.

Report information
The Basics
Id: 78668
Status: new
Priority: 0/
Queue: Starman

People
Owner: Nobody in particular
Requestors: nine [...] detonation.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: [patch] Allow more fine grained control of log_level
I would like to use Starman as optional engine for Test::WWW::WebKit::Catalyst, but by default, it's very verbose (as can be seen when running Starman's test suite). That's because log_level is hardcoded to 2 or 4 depending on the DEBUG constant. With the attached patch, Starman supports a new log_level parameter superseding these hardcoded values while maintaining backwards compatability with the current behaviour if the parameter is not present.
Subject: log_level_option.diff
diff --git a/lib/Starman/Server.pm b/lib/Starman/Server.pm index b9f6b08..c154cde 100644 --- a/lib/Starman/Server.pm +++ b/lib/Starman/Server.pm @@ -69,7 +69,7 @@ sub run { host => $host, proto => $proto, serialize => 'flock', - log_level => DEBUG ? 4 : 2, + log_level => $options->{log_level} // (DEBUG ? 4 : 2), ($options->{error_log} ? ( log_file => $options->{error_log} ) : () ), min_servers => $options->{min_servers} || $workers, min_spare_servers => $options->{min_spare_servers} || $workers - 1,