here is my problem: I would like to use and existing Zend_Log instance (instance which already exists in my application) but I would like to write my logs to a different file (same path to log file like in the existing writer but with different name). Do you guys have any idea how can I do this ? so far I only found a solution which is based on a Zend_Log instance + few writers + filter -> each log entry is written to a different file name. Existing Zend_Log instance has a one single writer (instance of Zend_Log_Writer_Stream class). Im under impression that such thing is really trivial but Im not able to find it. My current solution is to create a new instance of Zend_Log and add a new writer. Any suggestions are welcome :) I hope this is not a silly question :D Im not a ZF master.
Asked
Active
Viewed 150 times
0
-
I suspect that this is not possible at all :/ – Robert Sep 05 '12 at 15:52
-
When using the addWriter() method, you can add more than one write but then, you Zend_Log will write to all of them. – Joel Lord Sep 05 '12 at 15:55
1 Answers
2
In the current implementation you cannot detach a writer from a Zend_Log.
Your options are:
- add new writer to Zend_Log and submit yourself to the fact that there will be two logs.
- create new Zend_Log with only one writer attached.

akond
- 15,865
- 4
- 35
- 55