Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger support, rewrote most of it to support unit testing better #5

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

inditel
Copy link

@inditel inditel commented Jun 20, 2013

Added Zend Logger support. Now all errors can also be logged through Zend Logger.

Pull is optional, if you think it should not be done, I will continue with the fork.

(If merged, check readme.md and composer.json for package names. They should be changed.)

@ghislainf
Copy link
Owner

Hi,
I saw that quickly and it looks great ! I will take a look in detail on monday for the merge.
Thanks !

@ghislainf
Copy link
Owner

The logs files are illegible, an exemple :

2013-06-24T22:41:48+02:00 ERR (3):  {"file":"\/Volumes\/Project\/Sites\/zf2app\/module\/Application\/src\/Application\/Controller\/IndexController.php","line":20,"trace":"[\"{\\\"file\\\":\\\"\\\\\\\/Volumes\\\\\\\/Project\\\\\\\/Sites\\\\\\\/zf2app\\\\\\\/vendor\\\\\\\/zendframework\\\\\\\/zendframework\\\\\\\/library\\\\\\\/Zend\\\\\\\/Mvc\\\\\\\/Controller\\\\\\\/AbstractActionController.php\\\",\\\"line\\\":83,\\\"function\\\":\\\"indexAction\\\",\\\"class\\\":\\\"Application\\\\\\\\Controller\\\\\\\\IndexController\\\",\\\"type\\\":\\\"->\\\",\\\"args\\\":\\\"[]\\\"}\",\"{\\\"function\\\":\\\"onDispatch\\\",\\\"class\\\":\\\"Zend\\\\\\\\Mvc\\\\\\\\Controller\\\\\\\\AbstractActionController\\\",\\\"type\\\":\\\"->\\\",\\\"args\\\":\\\"[\\\\\\\"object(Zend\\\\\\\\\\\\\\\\Mvc\\\\\\\\\\\\\\\\MvcEvent) {}\\\\\\\"]\\\"}\",\"{\\\"file\\\":\\\"\\\\\\\/Volumes\\\\\\\/Project\\\\\\\/Sites\\\\\\\/zf2app\\\\\\\/vendor\\\\\\\/zendframework\\\\\\\/zendframework\\\\\\\/library\\\\\\\/Zend\\\\\\\/EventManager\\\\\\\/EventManager.php\\\",\\\"line\\\":472,\\\"function\\\":\\\"call_user_func\\\",\\\"args\\\":\\\"[\\\\\\\"[\\\\\\\\\\\\\\\"object(Application\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\Controller\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\IndexController) {}\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"onDispatch\\\\\\\\\\\\\\\"]\\\\\\\",\\\\\\\"object(Zend\\\\\\\\\\\\\\\\Mvc\\\\\\\\\\\\\\\\MvcEvent) {}\\\\\\\"]\\\"}\",\"{\\\"file\\\":\\\"\\\\\\\/Volumes\\\\\\\/Project\\\\\\\/Sites\\\\\\\/zf2app\\\\\\\/vendor\\\\\\\/zendframework\\\\\\\/zendframework\\\\\\\/library\\\\\\\/Zend\\\\\\\/EventManager\\\\\\\/EventManager.php\\\",\\\"line\\\":207,\\\"function\\\":\\\"triggerListeners\\\",\\\"class\\\":\\\"Zend\\\\\\\\EventManager\\\\\\\\EventManager\\\",\\\"type\\\":\\\"->\\\",\\\"args\\\":\\\"[\\\\\\\"dispatch\\\\\\\",\\\\\\\"object(Zend\\\\\\\\\\\\\\\\Mvc\\\\\\\\\\\\\\\\MvcEvent) {}\\\\\\\",\\\\\\\"object(Closure) {}\\\\\\\"]\\\"}\",\"{\\\"file\\\":\\\"\\\\\\\/Volumes\\\\\\\/Project\\\\\\\/Sites\\\\\\\/zf2app\\\\\\\/vendor\\\\\\\/zendframework\\\\\\\/zendframework\\\\\\\/library\\\\\\\/Zend\\\\\\\/Mvc\\\\\\\/Controller\\\\\\\/AbstractController.php\\\",\\\"line\\\":117,\\\"function\\\":\\\"trigger\\\",\\\"class\\\":\\\"Zend\\\\\\\\EventManager\\\\\\\\EventManager\\\",\\\"type\\\":\\\"->\\\",\\\"args\\\":\\\"[\\\\\\\"dispatch\\\\\\\",\\\\\\\"object(Zend\\\\\\\\\\\\\\\\Mvc\\\\\\\\\\\\\\\\MvcEvent) {}\\\\\\\",\\\\\\\"object(Closure) {}...

This part must be reviewed.
Cheers ! 🍺

@inditel
Copy link
Author

inditel commented Jun 25, 2013

Hi

This is done by zend logger. It should be the same if logger logs this
information without whoops part or without my code.

Oliver

On Mon, Jun 24, 2013 at 11:55 PM, ghislainf [email protected]:

The logs files are illegible, an exemple :

2013-06-24T22:41:48+02:00 ERR (3): {"file":"/Volumes/Project/Sites/zf2app/module/Application/src/Application/Controller/IndexController.php","line":20,"trace":"["{\"file\":\"\\/Volumes\\/Project\\/Sites\\/zf2app\\/vendor\\/zendframework\\/zendframework\\/library\\/Zend\\/Mvc\\/Controller\\/AbstractActionController.php\",\"line\":83,\"function\":\"indexAction\",\"class\":\"Application\\Controller\\IndexController\",\"type\":\"->\",\"args\":\"[]\"}","{\"function\":\"onDispatch\",\"class\":\"Zend\\Mvc\\Controller\\AbstractActionController\",\"type\":\"->\",\"args\":\"[\\"object(Zend\\\\Mvc\\\\MvcEvent) {}\\"]\"}","{\"file\":\"\\/Volumes\\/Project\\/Sites\\/zf2app\\/vendor\\/zendframework\\/zendframework\\
/library\\/Zend\\/EventManager\\/EventManager.php\",\"line\":472,\"function\":\"call_user_func\",\"args\":\"[\\"[\\\\"object(Application\\\\\\\\Controller\\\\\\\\IndexController) {}\\\\",\\\\"onDispatch\\\\"]\\",\\"object(Zend\\\\Mvc\\\\MvcEvent) {}\\"]\"}","{\"file\":\"\\/Volumes\\/Project\\/Sites\\/zf2app\\/vendor\\/zendframework\\/zendframework\\/library\\/Zend\\/EventManager\\/EventManager.php\",\"line\":207,\"function\":\"triggerListeners\",\"class\":\"Zend\\EventManager\\EventManager\",\"type\":\"->\",\"args\":\"[\\"dispatch\\",\\"object(Zend\\\\Mvc\\\\MvcEvent) {}\\",\\"object(Closure) {}\\"]\"}","{\"file\":\"\\/Volume
s\\/Project\\/Sites\\/zf2app\\/vendor\\/zendframework\\/zendframework\\/library\\/Zend\\/Mvc\\/Controller\\/AbstractController.php\",\"line\":117,\"function\":\"trigger\",\"class\":\"Zend\\EventManager\\EventManager\",\"type\":\"->\",\"args\":\"[\\"dispatch\\",\\"object(Zend\\\\Mvc\\\\MvcEvent) {}\\",\\"object(Closure) {}...

This part must be reviewed.
Cheers ! [image: 🍺]


Reply to this email directly or view it on GitHubhttps://github.com//pull/5#issuecomment-19935161
.

Lugupidamisega,
Oliver Leisalu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants