Logging and monitoring are two pillars of mobile application stability. According to Gartner (2025), the APM solutions market will reach $8 billion by 2027. Proper logging allows not only finding bugs, but also predicting problems before they affect users.
Key Takeaways
Mobile application logging on iOS is built on os_log — Apple's built-in system, available since iOS 10. os_log writes logs to a single system log (on-device or via Console.app), supports categories, levels, and privacy tags. The combination of logging and monitoring on iOS via Console.app and xcrun allows tracking errors and performance in real time.
os_log has levels: Default, Info, Debug, Error, Fault. In production, Error and Fault are kept — Debug and Info are disabled. Choosing the right level is part of the mobile application monitoring strategy on iOS. Privacy: %{public}@ for unprotected data, %{private}@ for personal data.
CocoaLumberjack is a popular library for iOS logging. Unlike os_log, it supports custom formats, asynchronous writing, and log rotation. DDLog, DDTTYLogger (console), DDFileLogger (file with rotation). For remote monitoring, CocoaLumberjack can be combined with os_log — write to a file for remote logging and to os_log for Console.app.
For mobile application logging on Android, Timber is used — a library by Jake Wharton that has become the standard for the platform. Timber is a wrapper over Android Log (Logcat) that automatically adds the class tag and configures Tree. Timber is part of the Android mobile application monitoring system: DebugTree for debugging, CrashlyticsTree for sending data.
Timber uses Tree — a component that decides what to do with the log. In debug builds, DebugTree (output to Logcat), in release — CrashlyticsTree (crash sending). Timber.wtf() logs fatal errors. Timber.tag("CustomTag") overrides the tag. For effective monitoring, Timber is combined with APM tools.
Android Log has levels: VERBOSE, DEBUG, INFO, WARN, ERROR, ASSERT. ProGuard/R8 removes Log.d and Log.v in release — Timber allows logging via Plant. The level choice affects the quality of mobile application monitoring — in production, WARN and ERROR are kept.
| Tool | Platform | Format | Rotation | Remote | Complexity |
|---|---|---|---|---|---|
| os_log | iOS | Structured | System | Console.app | Low |
| CocoaLumberjack | iOS | Text/JSON | DDFileLogger | Yes (custom) | Medium |
| Timber | Android | Text | Logcat/Custom | Tree | Low |
| Sentry | iOS/Android | JSON | Server | Yes | Medium |
| Logcat | Android | Text | Buffer | ADB | Low |
When choosing a logging tool, consider: do you need remote logging, how often logs change, and who will analyze them. For startups, os_log or Timber is enough. For enterprise — CocoaLumberjack with server sending. At IT Sectr, we use the Timber + Crashlytics bundle for Android and os_log + CocoaLumberjack for iOS.
Structured logging — writing logs in JSON format instead of plain text. Example: instead of "User login failed" we write {"event": "login_failed", "user_id": 123, "reason": "invalid_password"}. This is the foundation for automatic monitoring — the ELK stack and Grafana filter, aggregate, and analyze such data.
Filtering by fields: find all logs with event=crash in the last hour. Aggregation: build a graph of error counts by app version. Integration with ELK (Elasticsearch, Logstash, Kibana) or Grafana. Structured logging is not mandatory for first releases, but becomes critical when DAU exceeds 10,000.
Remote logging — sending logs from the device to a server for centralized monitoring. Implemented via custom Tree (Android) or HTTP requests. Send only Error and Warning — do not waste user traffic. Log rotation: DDFileLogger (iOS) every 1 MB or 1 day. On Android, the Logcat buffer is limited.
Application Performance Monitoring (APM) — a class of tools for mobile application monitoring. APM measures: startup time, network requests, FPS, memory usage, crash rate. Main players: Sentry (Performance), New Relic Mobile, Datadog Mobile.
Sentry — not only crash reporting, but also performance monitoring. Sentry Performance creates distributed traces that show how long each stage took: from button press to server response. Supports iOS, Android, Flutter, React Native. Free up to 5k events per month.
New Relic Mobile provides metrics: session count, time in app, crash rate, network requests. Datadog Mobile is a more modern tool with real-time dashboards and alerts. Both are paid, but have free tiers. IT Sectr recommends starting with Firebase Performance and switching to paid APM when DAU exceeds 100,000.
Firebase Performance — a free mobile application monitoring tool from Google. Automatically collects metrics: app startup time, HTTP requests (URL, method, response code), FPS. For custom tracing, use the Trace API. Integration: add the SDK to build.gradle (Android) or Podfile (iOS).
Trace — a time segment with start and end that you measure. Example: trace = FirebasePerformance.getInstance().newTrace("checkout_process"). Metrics — numeric indicators (response size, item count). Firebase Performance does not require server infrastructure — all data goes through Firebase SDK. When monitoring mobile applications, the Trace API provides context for performance analysis.
Frequently Asked Questions
Standard levels: ERROR (critical errors), WARN (potential problems), INFO (key events), DEBUG (debugging), VERBOSE (detailed tracing). In production, ERROR, WARN, and INFO are kept, the rest are disabled.
Timber is a wrapper library over Logcat by Jake Wharton for mobile application logging on Android. It automatically inserts the class tag, configures Tree, and disables logs in production with one line of code.
APM (Application Performance Monitoring) — a class of tools for tracking performance: startup time, network requests, memory usage, crash rate. When monitoring mobile applications, New Relic, Datadog, and Firebase Performance help find bottlenecks before user complaints.
For a startup, Firebase Performance is enough — a free mobile application monitoring tool. New Relic and Datadog are connected when detailed tracing and custom dashboards are needed. IT Sectr recommends starting with Firebase and switching to paid solutions when DAU exceeds 100,000.
Structured logging is a log format in JSON or key-value instead of plain text. It allows filtering logs by fields, building charts, and automatically analyzing in ELK or Grafana. Without structured logs, it is difficult to find patterns in thousands of records.
Summary
We will develop a mobile application turnkey
IT Sectr creates iOS and Android applications for startups and businesses since 2017. We will advise you and propose the best solution.