im kinda new with log4php.. i need to output the INFO and DEBUG levels in different files. is that possible? my xml looks like this:
<appender name="dlog" class="LoggerAppenderRollingFile">
<param name="file" value="C:/log/dlog"></param></appender>
<appender name="ilog" class="LoggerAppenderRollingFile">
<param name="file" value="C:/log/ilog/"></param></appender>
<root>
<level value="DEBUG" />
<appender_ref ref="dlog" ></appender_ref>
</root>
<logger name="myLogger">
<level value="INFO"/>
<appender-ref ref="ilog" />
</logger>
**This outputs only the INFO levels in the corresponding filename please help :( thanks a lot.
I think the appropriate solution would be to apply a filter and a threshold to your appenders. Like so:
This would only allow messages with
debuglevel intodlogand (due to the threshold) onlyinfoand above intoilog. If you didn't want messages aboveinfolevel inilog, then you could apply the same filter as with thedlogappender.