{"id":22050137,"url":"https://github.com/icapps/log_to_secure_file","last_synced_at":"2026-04-19T02:09:21.373Z","repository":{"id":208447538,"uuid":"721210774","full_name":"icapps/log_to_secure_file","owner":"icapps","description":"Save and retrieve logs securely","archived":false,"fork":false,"pushed_at":"2025-04-08T12:00:36.000Z","size":279,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-08T12:17:25.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icapps.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}},"created_at":"2023-11-20T15:26:53.000Z","updated_at":"2025-04-08T12:00:38.000Z","dependencies_parsed_at":"2023-11-21T15:31:19.259Z","dependency_job_id":"8f302a61-d207-432f-8cbc-cc7f02d17316","html_url":"https://github.com/icapps/log_to_secure_file","commit_stats":null,"previous_names":["icapps/log_to_secure_file"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/icapps/log_to_secure_file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Flog_to_secure_file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Flog_to_secure_file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Flog_to_secure_file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Flog_to_secure_file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icapps","download_url":"https://codeload.github.com/icapps/log_to_secure_file/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icapps%2Flog_to_secure_file/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005272,"owners_count":26083863,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-30T14:17:59.478Z","updated_at":"2025-10-10T20:34:28.082Z","avatar_url":"https://github.com/icapps.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log_to_secure_file\nA secure way to store and retrieve logs per date.\n\n## How to setup\n\nCreate an instance of secure log storage:\n\n```Dart\nfinal storage = SecureLogStorage();\n```\n\nOptionally you can also pass some arguments:\n\n```Dart\n  final storage = SecureLogStorage(\n    providedStorage: storage,\n    logsExpireCheckInterval: const Duration(days: 7),\n    logsExpireTime: const Duration(days: 7),\n  );\n```\n\nprovidedStorage: You can pass your own instance of FlutterSecureStorage.\n\nlogsExpireCheckInterval: This is in which interval will be checked if the logs need to be deleted. in the example code every 7 days the package is going to check if logs are expired and will need to be deleted.\n\nlogsExpireTime: This decides how old logs can be before they are automatically deleted.\n\nOnce you have your instance of SecureLogStorage you'll have to initialize it by calling init before you can use it:\n\n```Dart\nstorage.init();\n```\n\nThe init function will also check if there are any out of date logs and will delete them.\n\n## How to use\n\n### Saving logs\nWhen logging something call the method 'storeLogLine' to save this line like this:\n\n```Dart\nstorage.storeLogLine('This is a test');\n```\n\n### Retrieving logs\nYou can retrieve all the dates that have logs on them by using 'availableDates'.\n\n```Dart\nstorage.availableDates();\n```\n\nYou can then use this date to retrieve the actual stored logs by using 'getLogFromDate'.\n\n```Dart\nfinal dates = storage.availableDates();\nstorage.getLogFromDate(dates.first);\n```\n\n### Deleting logs\nIf you want to delete all stored logs you can call 'deleteLogs'.\n\n```Dart\nstorage.deleteLogs();\n```\n\n### Disposing\nTo dispose of the object and also stop the automatic checking of out of date logs call 'dispose'.\n\n```Dart\nstorage.dispose();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficapps%2Flog_to_secure_file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficapps%2Flog_to_secure_file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficapps%2Flog_to_secure_file/lists"}