Closed jonathangreco closed 8 years ago
Is this issue supposed to be closed? Was it resolved?
Hi Ocramius.
I solved this by configuring writers into the constructor which I didn't do . This problem was an architecture issue from my project.
For me this issue deserves to be closed and forgotten ^^'
I don't know how zend-log was supposed to work, so I've posted an issue without asking myself if I've implemented it the right way. I thought that a writer could be removed easily which is not the case.
@jonathangreco alright!
For me this issue deserves to be closed and forgotten ^^'
That's actually why I asked. While it may have been a mistake on your end, this issue may still help others.
Hi,
I tried to implements in my architecture a service wich log some things.
I have a factory wich give in a dependancy my Logger (with the PSR3 adapter) This part works.
So in a controller for testing purposes, I tried to do some consecutive logs :
My problem is, the second log is Inserted twice, one by itself, and the second time, when Notice's log comes out. Because my service has a single instance of the logger and INFO & NOTICE are registered in the same file.
I tried then to shutdown those writers after I insert the log, no luck!
When I reopen the same file https://github.com/zendframework/zend-log/blob/master/src/Writer/Stream.php#L82 this line stored for me the old resource wich not exist anymore due to the shutdown call.
The error I got is :
And a screen of my var dump in the stream.php's file
You can see in the last line that $this->stream has 751 in place of 753.
Thanks in advance for you advice / help.