Best approach for logging from views
Is there any reasonable approach to logging from views? I mean
the one apart from:
- passing ILogger to view constructor, - injecting ILogger to view
by [Inject] tag. The two above I consider not to handy to add or
remove. Do you guys have any other ideas on the subject?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on 21 Oct, 2015 03:52 PM
Hi Jakub!
Not sure how you'd expect to pass a logger to the view instead of the ways you've mentioned.
There is of course the option of injecting the logger into the mediator and setting it on the view, but that's not what you're looking for, I guess.
Concerning the removal / disabling of the logger, for example when you want to deploy a release build of your application, you can simply set the log level to zero in your context config class:
Does that answer your question?
Ondina
Ondina D.F. closed this discussion on 30 Nov, 2015 04:07 PM.