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_products.log ErrorDestination "search error: %s" logs/search_errors.log
Example: Routing error messages based on an arbitrary tag
ErrorDestination missing_code logs/missing_product.log
Example: Logging in Perl and specifying a custom tag
::logError( 'Bad search column ' . $_, { tag => 'search' } );
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 3188 (context shows lines 3188-3205)
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); }