Permalink
Browse files

Use Static::Simple under Starman when not in production mode

  • Loading branch information...
1 parent 2b90766 commit 885ce5804be78aa6f193766e96902a25fef40f98 @autarch autarch committed Mar 16, 2012
Showing with 1 addition and 33 deletions.
  1. +1 −33 lib/VegGuide/Config.pm
View
@@ -34,7 +34,6 @@ use Sys::Hostname qw( hostname );
+VegGuide::Plugin::User
Cache
Cache::Store::FastMmap
- Log::Dispatch
RedirectAndDetach
SubRequest
);
@@ -46,7 +45,7 @@ use Sys::Hostname qw( hostname );
@Imports = @StandardImports;
push @Imports, 'Static::Simple'
- unless $ENV{PLACK_ENV} || __PACKAGE__->Profiling();
+ unless __PACKAGE__->IsProduction() || __PACKAGE__->Profiling();
push @Imports, 'StackTrace'
unless __PACKAGE__->IsProduction() || __PACKAGE__->Profiling();
@@ -164,8 +163,6 @@ sub AlzaboRootDir {
},
dbi => { user => 'root' },
-
- __PACKAGE__->_LogConfig(),
);
$BaseConfig{root} = __PACKAGE__->ShareDir();
@@ -181,35 +178,6 @@ sub AlzaboRootDir {
};
}
- sub _LogConfig {
- my $class = shift;
-
- my @loggers;
- if ( $class->IsProduction() && $ENV{PLACK_ENV} ) {
- require Apache2::ServerUtil;
-
- push @loggers, {
- class => 'ApacheLog',
- name => 'ApacheLog',
- min_level => 'warning',
- apache => Apache2::ServerUtil->server(),
- callbacks => sub {
- my %m = @_;
- return 'vegguide: ' . $m{message};
- },
- };
- }
- else {
- push @loggers, {
- class => 'Screen',
- name => 'Screen',
- min_level => 'debug',
- };
- }
-
- return ( 'Log::Dispatch' => \@loggers );
- }
-
sub CatalystConfig {
return %BaseConfig;
}

0 comments on commit 885ce58

Please sign in to comment.