Logging and Monitoring in Mobile Development: Essence, Tools, and How to Set Up

Author: IT Sectr Published: 2026-05-27 Reading time: 8 min

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

  • On iOS, the main tools are os_log (built-in system logging) and CocoaLumberjack (a flexible library with rotation and formatting). Monitoring on iOS allows you to control performance in real time.
  • On Android, the standard is Timber (a wrapper over Logcat) and the system Log. Timber automatically inserts the class tag and manages logging levels.
  • Structured logging — writing logs in JSON. Allows automatic log analysis via ELK, Grafana or Datadog. Recommended for production and automatic monitoring.
  • APM (Application Performance Monitoring) — a class of tools for mobile application monitoring: New Relic, Datadog, Firebase Performance.
  • Log rotation and remote logging are mandatory for production. Logs should not fill device memory and must be accessible to the developer remotely.

Logging and Monitoring on iOS: os_log and CocoaLumberjack

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.

Log Level on iOS

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

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.

Logging and Monitoring on Android: Timber and Log Level

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 in Detail

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.

Log Level on Android

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_logiOSStructuredSystemConsole.appLow
CocoaLumberjackiOSText/JSONDDFileLoggerYes (custom)Medium
TimberAndroidTextLogcat/CustomTreeLow
SentryiOS/AndroidJSONServerYesMedium
LogcatAndroidTextBufferADBLow

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

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.

Benefits of Structured Logging

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 and Log Rotation

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.

APM and Mobile Application Monitoring: Sentry, New Relic, Datadog

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 Performance

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 and Datadog

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

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 and Metrics

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

What logging levels exist and when should they be used?

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.

How is Timber different from Logcat in Android?

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.

What is APM and why does a mobile app need it?

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.

Should a startup use paid APM solutions?

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.

What is structured logging and how is it better than plain text?

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

  • os_log — the basic logging and monitoring tool on iOS. CocoaLumberjack adds flexibility, rotation, and remote logging.
  • Timber — the standard for mobile application logging on Android. DebugTree for debug, CrashlyticsTree for release.
  • Structured logging (JSON) is necessary for automatic log analysis. Integrates with ELK, Grafana, Datadog.
  • APM — Sentry Performance, New Relic, Datadog. Firebase Performance — a free mobile application monitoring tool for startups.
  • Log rotation prevents device memory overflow. Configure DDFileLogger (iOS) or use Logcat buffer (Android).
  • Remote logging — send only Error and Warning logs. All logs waste user traffic.
  • Trace API and breadcrumbs (Sentry) provide context for mobile application monitoring, turning logs into an incident story.

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.

Discuss the project