1 """
2 Implements a simple logging handler that's actually used by the lamson log
3 command line tool to run a logging server. It simply takes every message it
4 receives and dumps it to the logging.debug stream.
5 """
6
7 from lamson.routing import route, stateless
8 import logging
9
10 @route("(to)@(host)", to=".+", host=".+")
11 @stateless
12 -def START(message, to=None, host=None):
13 """This is stateless and handles every email no matter what, logging what it receives."""
14 logging.debug("MESSAGE to %s@%s:\n%s" % (to, host, str(message)))
15