-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add logging in Console Controller #49
Conversation
I'd prefer adding |
I struggled with which was the best way to handle it, I've updated it so they can just output at execution rather than relying on the Yii config. Also, I have added more 'actions' so the user has more control over what can be excluded or included in the log. Let me know if you think there are any other things that should be changed. |
That is good, although I still prefer letting Yii logroute to handle instead of setting it ourselves in the class. |
Okay I will look into that, I don't know if I am familiar with what you are referencing or if I just refer to it differently. Could you point me in a direction of what you're talking about and I'll add the commit in the morning? |
This one http://www.yiiframework.com/doc-2.0/guide-runtime-logging.html#log-targets My point is, let's just log all the output and let the user decide which category they want to log. |
Oh you're referring to the levels correct? My concern with this is the amount of logging that happens with "Running new process... No job", and that is the main reason that I created the PR. I personally think that it is unnecessary to continuously log this particular line, as it results in massive log files. I really only want to log information about what task was run and then any info that was outputted from that task. |
Ah I see. How about just keep the |
I simplified the logging process and am deferring to the console config settings now. |
Thanks a lot! |
Added the the ability to excluded certain items from being included in the log. For instance, the std output for "Running new process... No job" was causing massive log files. The user can exclude what actions they would like to omit from the log. Additionally, the user may now choose to log the output to the console, or they can choose to log it using Yii to the app.log runtime file.