✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

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.

Featured Templates

View More
AI Assistants
Talk with Claude 3
159 1523
AI Characters
Sarcastic AI Chat Bot
129 1713
AI Assistants
AI Chatbot Starter Kit v0.1
140 913
Verified Icon
AI Assistants
Speech to Text
137 1882

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.