Frequently Asked Questions about Logan
Q: What is Logan?
A: Logan is a lightweight, open-source case logging system designed specifically for mobile platforms (Android and iOS). It helps developers capture and manage application logs efficiently.
Q: What platforms does Logan support?
A: Logan supports both Android and iOS platforms.
Q: How do I install Logan?
A: For Android, you can add the dependency compile 'com.dianping.android.sdk:logan:1.2.2' to your project’s build.gradle file. For iOS, use CocoaPods by adding pod 'Logan', '~> 1.2.3' to your Podfile and running pod install.
Q: How do I initialize Logan?
A: Here’s an example of how to initialize Logan in Android:
java LoganConfig config = new LoganConfig.Builder() .setCachePath(getApplicationContext().getFilesDir().getAbsolutePath()) .setPath(getApplicationContext().getExternalFilesDir(null).getAbsolutePath() + File.separator + “logan_v1”) .setEncryptKey16(“0123456789012345”.getBytes()) .setEncryptIV16(“0123456789012345”.getBytes()) .build(); Logan.init(config);
And here’s how to initialize Logan in iOS:
objc #import “Logan.h”
NSData *keydata = [@“0123456789012345” dataUsingEncoding:NSUTF8StringEncoding]; NSData *ivdata = [@“0123456789012345” dataUsingEncoding:NSUTF8StringEncoding]; uint64_t file_max = 10 * 1024 * 1024; loganInit(keydata, ivdata, file_max);
Q: How do I write a log using Logan?
A: In Android, use Logan.w("your log message", logType);. In iOS, use logan(logType, @"your log message");.
Q: How do I upload log files?
A: Implement a SendLogRunnable in Android to preprocess and upload log files. Then, call Logan.s(date, mSendLogRunnable);.
Q: What permissions do I need to use Logan?
A: If you’re uploading log files to a server, you need the INTERNET permission. If you’re writing to or reading from the SD card, you need WRITE_EXTERNAL_STORAGE and READ_EXTERNAL_STORAGE permissions.
Q: Is log data encrypted?
A: Yes, Logan supports log encryption with a 16-bit key.
Q: Can Logan be integrated with UBOS?
A: Yes, integrating Logan with UBOS provides a comprehensive view of AI Agent behavior within mobile applications, enabling centralized log management, real-time monitoring, advanced analytics, and automated debugging.
Q: Where can I find the log parsing utilities?
A: The log parsing utilities are available in the Logan/parser-java directory for Java and are demonstrated in the Example/Logan-Server/server.js file for Node.js.
Logan
Project Details
- jasonkavenlong/Logan
- MIT License
- Last Updated: 6/4/2019
Recomended MCP Servers
Model Context Protocol (MCP) Server for Tibber
AI-powered FastMCP server for intelligent stock photo search, download, and attribution management from Unsplash
py-mcp-mssql
kakao map mcp server
Model Context Protocol Server for aggregating RSS feeds in Claude Desktop
A lightweight, ready-to-use TypeScript template for building Model Context Protocol (MCP) servers. This template provides the essential scaffolding...
A Model Context Protocol (MCP) server for creating, reading, and manipulating Microsoft Word documents. This server enables AI...
This project demonstrates how to use Cloudflare Browser Rendering to extract web content for LLM context. It includes...
Model Context Protocol (MCP) server for Excalidraw - Work in Progress





