ErrorDestination — route error messages to different files, based on message content or arbitrary tag
The directive allows routing error messages to different files, based on either message content or an arbitrary tag.
This allows us to add message "routing" information at a single place in the catalog configuration, instead of having to provide file attribute to each invocation of error-related tags of functions.
Example: Routing error messages based on error message
ErrorDestination "Attempt to order missing product code: %s" logs/missing_product.log
Example: Routing error messages based on an arbitrary tag
ErrorDestination missing_code logs/missing_product.log
Interchange 5.7.0:
Source: lib/Vend/Config.pm
Line 3132 (context shows lines 3132-3149)
sub parse_hash {
my($item,$settings) = @_;
if (! $settings) {
return $HashDefaultBlank{$item} ? '' : {};
}
my $c;
if(defined $C) {
$c = $C->{$item} || {};
}
else {
no strict 'refs';
$c = ${"Global::$item"} || {};
}
return hash_string($settings,$c);
}