coder-dongjiayi/MXLogger
MXLogger 是基于mmap内存映射机制的跨平台日志库,支持AES CFB 128位加密,支持iOS Android Flutter。核心代码使用C/C++实现, Flutter端通过ffi调用,性能几乎与原生一致。 底层序列化使用Google开源的flat_buffers实现,高效稳定。
github 로 이동하여 다운로드
MXLogger
MXLogger is a multi-platform collect logs library base on mmap. Support ios Android and Flutter。The core code use c/c++. Use the ffi call on the Flutter,Performance is almost identical to native. Data serialization uses Google’s open source flat_buffers implementation, which is efficient and stable.
中文说明请点击这里
Structure
![jiegoutu](./icon/jiegoutu.jpg)
Performance Test
Test environment
-
iphone11, System version 14.6
-
Each piece of data is about 134 bytes and loops for 100,000 times
-
Test 10 times and take an average
-
Setting Xcode Build Configuration is release
result
- 0.13s
Log viewing
- To parse the generated binary data, I wrote an accompanying parsing tool that you can viewmxlogger_analyzer,It looks something like this。
video link - you can input tag where search box for search tag attribute。name msg in a similar way。
Conolse
![jiegoutu](./icon/20230210103021.jpg)
https://user-images.githubusercontent.com/9606416/215237658-4f99fc51-4610-48c5-8803-daaf86400bf3.mp4
- If you’re using a Mac you can just download the client。If you are using windows, you may need to configure the Flutter environment yourself, compile the source code for mxlogger_analyzer and package the exe file。
- If your project is Project Flutter,you can dependencemxlogger_analyzer_lib
dependencies:
mxlogger_analyzer_lib:^1.0.2
MXAnalyzer.showDebug(
_navigatorStateKey.currentState!.overlay!,
diskcachePath: _mxLogger.diskcachePath,
cryptKey: _mxLogger.cryptKey,
iv: _mxLogger.iv,
databasePath: "you database path")
It looks something like this video link
https://user-images.githubusercontent.com/9606416/215238043-e7199344-ba26-42a6-b8f3-421035cdb46a.mp4
Install
iOS
pod 'MXLogger'
Android
implementation 'io.github.coder-dongjiayi:mxlogger:latest.release'
Flutter
dependencies:
flutter_mxlogger: ^last
notice
Do not set the log storage directory in a directory that may be cleaned up by the system, such as library/cache in ios. MXLogger does not check whether the directory exists every time it writes data, but only creates it at startup. If the log files are cleaned up by the system while the app is running, The program does not report errors or flash back, but the log is not logged either
-
iOS
MXLogger * logger = [MXLogger initializeWithNamespace:@"com.youdomain.logger.space",storagePolicy:MXStoragePolicyYYYYMMDD]; logger.maxDiskAge = 60*60*24*7; // a week logger.maxDiskSize = 1024 * 1024 * 10; // 10M logger.fileLevel = 0;// If the file write level is lower than this level, the log file will not be written to the file [logger debug:@"mxlogger" msg:@"this is debug" tag:@"network,action"]; [logger info:@"mxlogger" msg:@"this is info" tag:@"request"]; [logger warn:@"mxlogger" msg:@"this is warn" tag:@"step"]; [logger error:@"mxlogger" msg:@"this is error" tag:@"action"]; [logger fatal:@"mxlogger" msg:@"this is fatal" tag:@"reponse"];
-
Android
MXLogger logger = new MXLogger(this.getContext(),"com.djy.mxlogger"); logger.maxDiskAge = 60*60*24*7; // a week logger.maxDiskSize = 1024 * 1024 * 10; // 10M logger.debug("request","mxlogger","this is debug",tag:"tag1,tag2,tag3"); logger.info("response","mxlogger","this is info"); logger.warn("tag","mxlogger","this is warn"); logger.error("404","mxlogger","this is error"); logger.fatal("200","mxlogger","this is fatal");
-
Flutter
MXLogger logger = await MXLogger.initialize( nameSpace: "flutter.mxlogger", storagePolicy: MXStoragePolicyType.yyyy_MM_dd, cryptKey: "abcuioqbsdguijlk", iv: "bccuioqbsdguijiv"); logger.setMaxDiskAge(60*60*24*7); logger.setMaxDiskSize(1024*1024*10); logger.setFileLevel(0); logger.debug("this is debug ", name: "mxlogger", tag: "tag1,tag2,tag3"); logger.info("this is info", name: "mxlogger", tag: "w"); logger.warn("this is warn", name: "mxlogger", tag: "w"); logger.error("this is error", name: "mxlogger", tag: "e"); logger.fatal("this fatal", name: "mxlogger", tag: "f");
![](/images/banner-woo.jpg)
coder-dongjiayi/MXLogger 에 관련된 우수 프로젝트 추천 다운로드
AppFlowy
47859
AppFlowy is an open-source alternative to Notion. You are in charge of your data and customizations. Built with Flutter and Rust.
localsend
33797
An open-source cross-platform alternative to AirDrop
spotube
23772
🎧 Open source Spotify client that doesn't require Premium nor uses Electron! Available for both desktop & mobile!
revanced-manager
15035
💊 Application to use ReVanced on Android
gsy_github_app_flutter
14559
Flutter 超完整的开源项目,功能丰富,适合学习和日常使用。GSYGithubApp系列的优势:我们目前已经拥有Flutter、Weex、ReactNative、kotlin 四个版本。 功能齐全,项目框架内技术涉及面广,完成度高,持续维护,配套文章,适合全面学习,对比参考。跨平台的开源Github客户端App,更好的体验,更丰富的功能,旨在更好的日常管理和维护个人Github,提供更好更方便的驾车体验Σ( ̄。 ̄ノ)ノ。同款Weex版本 : https://github.com/CarGuo/GSYGithubAppWeex 、同款React Native版本 : https://github.com/CarGuo/GSYGithubApp 、原生 kotlin 版本 https://github.com/CarGuo/GSYGithubAppKotlin
dio
12249
A powerful HTTP client for Dart and Flutter, which supports global settings, Interceptors, FormData, aborting and canceling a request, files uploading and downloading, requests timeout, custom adapters, etc.
gopeed
11832
A modern download manager that supports all platforms. Built with Golang and Flutter.
bloc
11441
A predictable state management library that helps implement the BLoC design pattern
getx
9899
Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
flame
8846
A Flutter based game engine.
flutter_deer
7595
🦌 Flutter 练习项目(包括集成测试、可访问性测试)。内含完整UI设计图,更贴近真实项目的练习。Flutter practice project (including integration testing and accessibility testing). Contains complete UI design drawings for a more realistic practice project.
fish-redux
7343
An assembled flutter application framework.
ente
6686
Fully open source, End to End Encrypted alternative to Google Photos and Apple Photos
fl_chart
6451
FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
pixez-flutter
6360
一个支持免代理直连及查看动图的第三方Pixiv flutter客户端
Flutter-Responsive-Admin-Panel-or-Dashboard
6355
Responsive Admin Panel or Dashboard using Flutter
aidea
6021
AIdea 是一款支持 GPT 以及国产大语言模型通义千问、文心一言等,支持 Stable Diffusion 文生图、图生图、 SDXL1.0、超分辨率、图片上色的全能型 APP。
riverpod
5828
A reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
pikapika
5463
美观易用且无广告的漫画和游戏客户端,同时支持MacOS,Windows,Android,iOS。
provider
5029
InheritedWidgets, but simple