-
Notifications
You must be signed in to change notification settings - Fork 75
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
Injecting SwiftyBeaver as logger #163
Comments
Just register your logger like |
Thanks for the reply. That was one of the permutations that I have already tried, it fails in compilation trying to use methods (
However, did just notice that |
That's how auto-injected properties work, you have to use |
OK, thanks, I guess I misread the documentation a bit. |
I'm new to iOS & Swift in general, and am in the process of setting up a new project with Dip & Dip-Ui and most things according to the documentation has been going well. However, we're using SwiftyBeaver for logging in the application, and their documentation suggests setting up a global
log
variable like so:While convenient, this also means that I need to define the same global in my unit test setups, which feels like it may cause issues. I would rather use autoInjection to provide this dependency on a per file & per test basis, but I have not been able to add something written as the SwiftyBeaver class to my container. As the linked file shows, this class does not have an explicit initializer and uses class functions for functionality.
Is there any way to "wrap" this kind of class?
The text was updated successfully, but these errors were encountered: