my @before_inc = grep { filter_not_core() } keys %mods;
my @after_inc;
-#TODO obviously this should be made into a method or configurable some how
+#TODO this is the wrong path to go down - fork() will bring
+#the env vars with it and the ssh connector can handle
+#forwarding the env vars
my $env_pass = '';
if (defined($ENV{OBJECT_REMOTE_LOG_LEVEL})) {
my $level = $ENV{OBJECT_REMOTE_LOG_LEVEL};
=head1 LEVEL NAMES
-Object::Remote uses an ordered list of log level names with the minimum level
-first and the maximum level last. The list of level names can be accessed via
+Object::Remote uses an ordered list of log level names with the lowest level
+first and the highest level last. The list of level names can be accessed via
the arg_levels method which is exportable to the consumer of this class. The log
level names are:
#skip DESTROY and friends
return if $log_level =~ m/^[A-Z]+$/;
- if ($log_level =~ s/f$//) {
- my $format = shift(@content);
- $generator = sub { sprintf($format, @content) };
+ if ($log_contextual_level = $LEVEL_NAME_MAP{$log_level}) {
+ $generator = sub { @content };
+ } elsif(($log_level =~ s/f$//) && ($log_contextual_level = $LEVEL_NAME_MAP{$log_level})) {
+ my $format = shift(@content);
+ $generator = sub { sprintf($format, @content) };
} else {
- $generator = sub { @content };
+ croak "invalid log level: $log_level";
}
-
- $log_contextual_level = $LEVEL_NAME_MAP{$log_level};
- croak "invalid log level name: $log_level" unless defined $log_contextual_level;
-
+
router->handle_log_request({
controller => 'Log::Any',
package => scalar(caller),
$method = '(none)' unless defined $method;
return {
- '%' => '%', t => $self->_render_time($metadata->{timestamp}),
+ '%' => '%', 'n' => "\n",
+ t => $self->_render_time($metadata->{timestamp}),
r => $self->_render_remote($metadata->{object_remote}),
s => $self->_render_log(@$content), l => $level,
c => $metadata->{controller}, p => $metadata->{package}, m => $method,