Question

I want to integrate Monolog logger (https://github.com/Seldaek/monolog) to my own framework I have followed the PSR0 standard for structuring my framework so that namespacing is easy an follows the directory structure

Now, I would like the logging to reside under Core/Logger directory, but Monolog uses its own namespace and I am wondering if I need to go and change its namespaces to match my structure? I believe that I do not need to do that, but I think I am missing something.

Is there a way to use it by just putting it under my Core/Logger dir and not change its own namespace?

Thanks

Was it helpful?

Solution

The short answer is no you can't put it in there without changing the namespace if you want to follow PSR-0.

The longer answer is that you should really use composer to pull in the monolog files and then they'll happily live in the vendor/ directory and be autoloadable and you should not have to care where they reside on the filesystem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top