1 package DBIx::Class::DeploymentHandler::Logger;
6 use parent 'Log::Contextual::WarnLogger';
8 # trace works the way we want it already
10 # sub is_trace { $_[0]->next::method }
11 sub is_debug { $_[0]->is_trace || $_[0]->next::method }
12 sub is_info { $_[0]->is_debug || $_[0]->next::method }
15 my $orig = $_[0]->next::method;
16 return undef if defined $orig && !$orig;
17 return $_[0]->is_info || 1
21 my $orig = $_[0]->next::method;
22 return undef if defined $orig && !$orig;
23 return $_[0]->is_warn || 1
27 my $orig = $_[0]->next::method;
28 return undef if defined $orig && !$orig;
29 return $_[0]->is_error || 1
35 my $message = join( "\n", @_ );
36 $message .= "\n" unless $message =~ /\n$/;
37 warn "[DBICDH] [$level] $message";
41 my ($self, $options, @rest) = @_;
44 $options->{env_prefix} ||= 'DBICDH';
46 $self->next::method($options, @rest)