You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it is pretty hard to debug the tracker if something goes wrong or not as expected. I think we should be more verbose at some points without being to talky.
What are events that we want to log per default?
Failed dispatching?
How should we categorize logs? Just debug yes/no? Or more complex verbose/debug/info/warning/error? I think debug yes/no should be enough.
How should we log the messages? Always to the console?
The text was updated successfully, but these errors were encountered:
How about defining a simple logger protocol like so:
protocolLogger{func log(message:String)func debug(message:String)}finalclassConsoleLogger:Logger{func log(message:String){print("[PiwikTracker] | \(message)")}func debug(message:String){print("[PiwikTracker] Debug | \(message)")}}letlogger:Logger=ConsoleLogger()
logger.log(message:"This is an important message!")
logger.debug(message:"This is just a debug message.")
For now we just use the ConsoleLogger. In the future we can then give users the option to create a custom logger that passes the messages to their own logging mechanism.
Right now it is pretty hard to debug the tracker if something goes wrong or not as expected. I think we should be more verbose at some points without being to talky.
The text was updated successfully, but these errors were encountered: