{"id":13344150,"url":"https://github.com/tercanfurkan/log-inspector","last_synced_at":"2025-03-12T06:31:18.409Z","repository":{"id":70812547,"uuid":"557848317","full_name":"tercanfurkan/log-inspector","owner":"tercanfurkan","description":"LogInspector API: count the number of log lines which contain a given search query","archived":false,"fork":false,"pushed_at":"2022-11-13T09:08:01.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-24T16:51:07.223Z","etag":null,"topics":["filesystem","kotlin","logging","regex","zip"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tercanfurkan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10-26T12:23:35.000Z","updated_at":"2022-10-26T15:36:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9d7c68b-a40b-4125-a852-c8226dc28cbc","html_url":"https://github.com/tercanfurkan/log-inspector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tercanfurkan%2Flog-inspector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tercanfurkan%2Flog-inspector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tercanfurkan%2Flog-inspector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tercanfurkan%2Flog-inspector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tercanfurkan","download_url":"https://codeload.github.com/tercanfurkan/log-inspector/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171660,"owners_count":20247878,"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":["filesystem","kotlin","logging","regex","zip"],"created_at":"2024-07-29T19:32:27.944Z","updated_at":"2025-03-12T06:31:18.389Z","avatar_url":"https://github.com/tercanfurkan.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log-inspector\n\nA gradle (7.3) project which uses kotlin.jvm 1.6.21\n\nLogInspector API which maps log file names TO the number of lines which contains the given search query\n\n## Sample\n\n\n### ZIP file \"23-10-2022_26-10-2022-output.zip\":\nZIP archive contains:\n```\n23-10-2022-output.log\n24-10-2022-output.log\n25-10-2022-output.log\n26-10-2022-output.log\n```\n\n### Using the API\n```kotlin\nval logInspector = LogInspector()\nval searchQuery = \"MQTT\"\nval zipFileName = \"23-10-2022_26-10-2022-output.zip\"\nval zipFile: File = Paths.get(javaClass.getResource(zipFileName)!!.toURI()).toFile()\nval fileNameToLineCountMap = logInspector.countEntries(LocalDate.of(2022, 10, 23), LocalDate.of(2022, 10, 25), \"MQTT\", zipFile)\n```\n\n### Output\n```json\n{\n  \"23-10-2022-output.log\" : 2,\n  \"24-10-2022-output.log\" : 3,\n  \"25-10-2022-output.log\" : 6\n}\n```\n\n*** If you have a different date format in your log files:\n```kotlin\nval dateRegex = \"\\\\d{4}-\\\\d{2}-\\\\d{2}\"\nval dateFormat = \"yyyy-MM-dd\"\nval logInspector(dateRegex, dateFormat)\n...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftercanfurkan%2Flog-inspector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftercanfurkan%2Flog-inspector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftercanfurkan%2Flog-inspector/lists"}