{"id":20393472,"url":"https://github.com/dart-native/ffi_log","last_synced_at":"2025-07-08T06:41:42.998Z","repository":{"id":130743046,"uuid":"486898395","full_name":"dart-native/ffi_log","owner":"dart-native","description":"Flutter's sync log component implementation by DartNative.","archived":false,"fork":false,"pushed_at":"2022-05-27T06:44:09.000Z","size":70,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T22:46:59.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dart-native.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-29T08:39:12.000Z","updated_at":"2024-05-25T17:06:09.000Z","dependencies_parsed_at":"2023-06-27T02:36:14.786Z","dependency_job_id":null,"html_url":"https://github.com/dart-native/ffi_log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dart-native/ffi_log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-native%2Fffi_log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-native%2Fffi_log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-native%2Fffi_log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-native%2Fffi_log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dart-native","download_url":"https://codeload.github.com/dart-native/ffi_log/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dart-native%2Fffi_log/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264211414,"owners_count":23573505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T03:48:59.318Z","updated_at":"2025-07-08T06:41:42.992Z","avatar_url":"https://github.com/dart-native.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ffi_log\n\nFlutter's sync log component implementation by DartNative.\n\n## Supported Platforms\n\niOS \u0026 Android\n\n## Usage\n\nDart code :\n\n```dart\n// init log\nFFILog.init();\n\n// log message\nFFILog.debug(\"MyApp\", \"log debug\");\nFFILog.info(\"MyApp\", \"log info\");\nFFILog.warn(\"MyApp\", \"log warn\");\nFFILog.error(\"MyApp\", \"log error\", stackTrace: StackTrace.current);\n```\n\nObjective-C code:\n\n```objectivec\n// implementation FFILogDelegate\n@interface LogImpl() \u003cFFILogDelegate\u003e\n@end\n\n@implementation LogImpl\n- (int)getLogLevel {\n    return FFILogLevelAll;\n}\n\n- (void)printLog:(int)level tag:(NSString *)tag content:(NSString *)content {\n    // native logger\n    NSLog(@\"native log|%zd|%@|%@\", level, tag, content);\n}\n@end\n\n// set implementation\n[FFILog sharedInstance].delegate = [[LogImpl alloc] init];\n```\n\nJava code:\n\n```java\n// set FFILog.ILog implementation\nFFILog.setLog(new FFILog.ILog() {\n    @Override\n    public void printLog(int level, String tag, String content) {\n        switch (level) {\n            case FFILog.ILog.ERROR:\n                Log.e(tag, content);\n                break;\n            case FFILog.ILog.WARN:\n                Log.w(tag, content);\n                break;\n            case FFILog.ILog.INFO:\n                Log.i(tag, content);\n                break;\n            case FFILog.ILog.DEBUG:\n                Log.d(tag, content);\n                break;\n            default:\n                break;\n        }\n    }\n\n    @Override\n    public int getLogLevel() {\n        return FFILog.ILog.ALL;\n    }\n\n    // If dartnative so path is custom, return so path.\n    // Otherwise return null.\n    @Override\n    public String getCustomDartNativePath() {\n        return null;\n    }\n});\n```\n\n## License\n\nffi_log is available under the BSD 3-Clause License. See the LICENSE file for more info.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-native%2Fffi_log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdart-native%2Fffi_log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdart-native%2Fffi_log/lists"}