문제

I have a case where I might be having multiple DBs and each DB will have it's own log table.

Since I'm using DBAppender in a log4php.xml, how do I change dynamically (on rumtime) change the database name and/or db host. Is there any possibility to do that ?

Thanks

도움이 되었습니까?

해결책

You can configure log4php at runtime using a PHP array instead of an XML configuration, as show in log4php doc :

http://logging.apache.org/log4php/docs/configuration.html

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top