Skip to content

AuroraCoreAndroid Root 日志系统与文件监听工具

专为Android root环境设计的高性能日志记录和文件监控解决方案

AuroraCore

快速示例

Logger API 使用方法

cpp
#include "loggerAPI/logger_api.hpp"

int main() {
    // 配置日志器
    LoggerAPI::InternalLogger::Config config;
    config.log_path = "app.log";
    config.max_file_size = 10 * 1024 * 1024; // 10MB
    config.min_log_level = LoggerAPI::LogLevel::DEBUG;
    
    LoggerAPI::init_logger(config);
    
    // 开始记录日志
    LoggerAPI::info("应用程序已启动");
    LoggerAPI::debug("调试信息");
    LoggerAPI::error("发生错误");
    
    LoggerAPI::shutdown_logger();
    return 0;
}

FileWatcher API 使用方法

cpp
#include "filewatcherAPI/filewatcher_api.hpp"

int main() {
    FileWatcherAPI::FileWatcher watcher;
    
    // 添加文件监听和回调
    watcher.add_watch("/data/config", 
        [](const FileWatcherAPI::FileEvent& event) {
            std::cout << "文件 " << event.filename 
                      << " 被 " << FileWatcherAPI::event_type_to_string(event.type) 
                      << std::endl;
        },
        FileWatcherAPI::make_event_mask({
            FileWatcherAPI::EventType::MODIFY,
            FileWatcherAPI::EventType::CREATE
        })
    );
    
    watcher.start();
    // ... 你的应用程序逻辑
    watcher.stop();
    
    return 0;
}

为什么选择 AuroraCore?

  • 🎯 专门构建: 专为Android root环境约束而设计
  • ⚡ 高性能: 优化以实现最小的CPU使用率和功耗
  • 🔒 可靠性: 经过实战测试的守护进程-客户端架构,具有强大的错误处理能力
  • 📚 文档完善: 提供全面的文档,包含示例和最佳实践
  • 🚀 易于集成: 头文件API,可无缝集成到现有项目中

开始使用

准备将AuroraCore集成到你的Android项目中?查看我们的快速开始指南或浏览API参考获取详细文档。

社区与支持

Released under the MIT License.