【发布时间】:2015-02-19 05:58:22
【问题描述】:
如何启用 Esper @Audit 日志记录?
我尝试了这段代码,但我得到了来自 Esper 的任何输出。
@Name('ENTRY')
@Audit
@Subscriber(className='ch.algotrader.strategy.box.BoxService.entry')
@Priority(0)
select
case
when currentValue > box.upperBuffer then Direction.LONG
else Direction.SHORT
end as direction,
currentValue
from
MarketDataEvent
where
state = State.CREATED
and
(currentValue > box.upperBuffer
or
currentValue < box.lowerBuffer);
来自手册:
15.4.13。与日志相关的引擎设置
15.4.13.1。执行路径调试日志
默认情况下,即使 Log4j 或 Logger 配置已设置为输出调试级别日志,引擎也不为事件处理执行路径生成调试输出。要启用调试级别日志记录,请在配置以及 Log4j 配置文件中设置此选项。
可以通过@Audit注解输出语句级处理信息,请参见第16.3.1节,“@Audit注解”。
【问题讨论】: