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

[FEATURE] Logging context and Monolog format handling #1833

Closed
rickmacgillis opened this issue Feb 12, 2015 · 2 comments
Closed

[FEATURE] Logging context and Monolog format handling #1833

rickmacgillis opened this issue Feb 12, 2015 · 2 comments

Comments

@rickmacgillis
Copy link
Contributor

Monolog is used for FuelPHP's logging system backend, and Monolog supports arbitrary context data. (An array of arbitrary data with information about what caused the logging event) Both \Log::write(), and logger() interface directly with Monolog's \Monolog\Logger::log() method to write entries.

Proposed Change
Alter \Log::write() and logger() to accept a fourth parameter for $context, and pass it along to \Monolog\Logger::log() for processing.

It would also be ideal if you could separate \Log::_init() into a secondary method for handling exactly how logs are stored through Monolog. That way people can extend the \Log class, and override the new method without having to call parent::_init() to keep the directory structure, while needlessly setting up the original Monolog recording methods. (See: http://fuelphp.com/docs/general/extending_core.html#extend_and_replace)

@emlynwest
Copy link
Contributor

While a perfectly valid idea I feel that any new major changes should be left out of v1 now in favour of working on v2. I'd rather that our efforts went into the new version of the framework so we can feature freeze v1.

@WanWizard thoughts?

@WanWizard
Copy link
Member

I'll have to look at the impact and the amount of work. A PR would be handy.

Since it functionally doesn't change anything, if it's not a lot of work, it could be part of the upcoming1.7.3.

I agree major v1 should be frozen functionally, I think a last release will be a good moment for that.

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

No branches or pull requests

3 participants