Mobile Development 13 min read

Logan: Meituan-Dianping Mobile Logging Framework Overview

Logan, Meituan‑Dianping’s open‑source mobile logging framework, unifies log collection, secure storage, backend processing, and visual frontend tools to capture all user‑side logs without sampling, enabling fast case‑analysis debugging across Android, iOS, mini‑programs and web, with future ML‑driven insights.

Meituan Technology Team
Meituan Technology Team
Meituan Technology Team
Logan: Meituan-Dianping Mobile Logging Framework Overview

Logan is Meituan-Dianping's mobile-side foundational logging component, combining "Log" and "An" to provide a sharp, reliable logging service. After a year of stable iteration, Logan has been adopted by most Meituan-Dianping apps for log collection, upload, and analysis.

The open‑source release includes the storage SDK for Android and iOS, aiming to help developers solve mobile log storage and collection challenges.

Challenges – Mobile logs grow with business expansion, leading to delayed upload, limited information, isolated log islands, and sampling loss. Reproducing bugs on identical devices is often impossible, making log‑driven debugging essential.

Proposed solution – Shift from fragmented log handling to "case analysis": aggregate all logs generated by a user during a bug episode, avoid sampling, and filter irrelevant data to reconstruct the bug scenario.

Core architecture – Logan consists of four modules: Log Input, Log Storage, Backend System, and Frontend System.

Log Input – Supports various log types (code, network, user behavior, crash, H5). Logs are stored locally without sampling, preserving detailed information such as request/response headers.

Log Storage – Implements a custom log protocol with "compress‑then‑encrypt" flow, stream‑based processing, MMAP‑based fragmentation, AES encryption, and a 7‑day retention policy to ensure low overhead, high performance, and data safety.

Backend System – Receives logs (active or pull‑based), decrypts and decompresses them, archives structured data, performs analysis, and feeds a data platform that stores cases and provides recommendation services.

Frontend System – Provides visualized log browsing, timeline analysis, search, filtering, and sharing. It helps developers quickly locate problematic logs and correlate them with code.

Case‑analysis workflow – Users report issues, customer service records a case and requests Logan logs, engineers retrieve and analyze logs via the frontend, pinpoint the bug, and fix it.

Future plans – Incorporate machine‑learning analysis of historical cases, open a data platform for downstream services, and expand open‑source support to more platforms.

Platform support & testing – Currently supports Android, iOS, mini‑program, and web frontends. Testing coverage exceeds 80% despite limited CI support for Android NDK.

Overall, Logan offers a lightweight, non‑intrusive, high‑performance logging solution for mobile developers, facilitating efficient bug diagnosis and system monitoring.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

iOSAndroidopen sourcelog collectionmobile logging
Meituan Technology Team
Written by

Meituan Technology Team

Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.