
[Tech] Custom log lines (aliasing NSLog) #iOS #Objective-C
Any developer knows the importance of logging while debugging. The more you log, the faster and easier it will be to find anomalies in the source code. It allows for instance to look at the data received from the network, in our case, the responses of the requests sent to our architecture. Anyway, two problems can appear around this problematic : - These logs, essentials in DEV, slow the app in PROD, and significantly degrade the user experience - The proliferation of logs makes the console unreadable very quickly, which requires rigor in writing their labels To solve these problems we have chosen to implement a logging system tailored to our needs. The idea is obviously not to reinvent the wheel - the standard system proposed by the iOS SDK is very effective - but to provide a simple to use tool, that ensures readability and performance.