Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 01330ec25d
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (42 sloc) 1.572 kb
__NAME__ purpose
route error messages to different files, based on message content or arbitrary tag
__END__
__NAME__ synopsis
<arg choice='plain'><replaceable>tag_or_message</replaceable></arg>
<arg choice='plain'><replaceable>filename</replaceable></arg>
__END__
__NAME__ description
The directive allows routing error messages to different files, based on
either message content or an arbitrary tag.
</para><para>
This allows us to add message "routing" information at a single place
in the catalog configuration, instead of having to provide
<arg choice='plain'>file</arg> attribute to each invocation of
error-related tags of functions.
__END__
__NAME__ notes
Specification of <literal>tag=</literal> does not currently work with
<literal>[log type=error]...[/log]</literal>.
__END__
__NAME__ missing
In examples, show how exactly would you call [error] tag (or whatever) to see ErrorDestination in practice
__END__
__NAME__ see also
ErrorFile
__END__
__NAME__ example: Routing error messages based on error message
<programlisting>
ErrorDestination "Attempt to order missing product code: %s" logs/missing_products.log
ErrorDestination "search error: %s" logs/search_errors.log
</programlisting>
__END__
__NAME__ example: Routing error messages based on an arbitrary tag
<programlisting>
ErrorDestination missing_code logs/missing_product.log
</programlisting>
__END__
__NAME__ example: Logging in Perl and specifying a custom tag
<programlisting><![CDATA[
::logError( 'Bad search column ' . $_, { tag => 'search' } );
]]></programlisting>
__END__
Jump to Line
Something went wrong with that request. Please try again.