From: <kea...@na...> - 2003-04-04 18:41:39
|
I've just created a #log directive that let's you easily log messages from a template. It supports optional parameters for the log level and log target, which default to "notice" and "context". Examples: #log { This is a test of the new log directive! } #set $errmsg='BIG TROUBLE!' #log as error { Logging a dummy error: $errmsg } #set $errmsg='MAYBE TROUBLE!' #log as warning target='test' { Logging a dummy warning to the 'test' target: $errmsg } Does this seem useful enough to put in the core? Any comments on the syntax? PS, the formal syntax is something like: #log [as (debug|info|notice|warning|error)] [target = <QUOTED-STRING>] <BLOCK> _______________________________________ Keats Kirsch Senior Technology Advisor NatureServe (http://www.natureserve.org) email: kea...@na... phone: (703)908-1895 |