{"id":15789742,"url":"https://github.com/ytake/hack-logging","last_synced_at":"2026-02-16T01:02:09.799Z","repository":{"id":45053530,"uuid":"163751652","full_name":"ytake/hack-logging","owner":"ytake","description":"Send logs to files For HHVM/Hack","archived":false,"fork":false,"pushed_at":"2023-08-11T12:49:03.000Z","size":53,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-05T22:03:03.840Z","etag":null,"topics":["hacklang","hhvm","logger","logging"],"latest_commit_sha":null,"homepage":"","language":"Hack","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/ytake.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"github":"ytake","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-01-01T16:49:10.000Z","updated_at":"2022-01-16T13:22:35.000Z","dependencies_parsed_at":"2024-10-26T03:26:34.768Z","dependency_job_id":"f79e79b8-ae23-449b-9a65-721dacc8502a","html_url":"https://github.com/ytake/hack-logging","commit_stats":{"total_commits":32,"total_committers":2,"mean_commits":16.0,"dds":0.03125,"last_synced_commit":"7600a125cfdc1b150bbe34a4a08c1ed98ab4467c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fhack-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fhack-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fhack-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytake%2Fhack-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytake","download_url":"https://codeload.github.com/ytake/hack-logging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246516862,"owners_count":20790307,"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":["hacklang","hhvm","logger","logging"],"created_at":"2024-10-04T22:03:13.981Z","updated_at":"2025-09-18T08:34:12.345Z","avatar_url":"https://github.com/ytake.png","language":"Hack","readme":"# hack-logging\n\n[![Build Status](https://travis-ci.org/ytake/hack-logging.svg?branch=master)](https://travis-ci.org/ytake/hack-logging)\n\n## Requirements\n\nHHVM 4.95 and above.\n\n## Usage\n\n```bash\n$ composer require hack-logging/hack-logging\n```\n\n### StdHandler\n\n```hack\nuse namespace HackLogging;\nuse namespace HH\\Lib\\IO;\n\nasync function fvAsync(): Awaitable\u003cvoid\u003e {\n  list($read, $write) = IO\\pipe();\n\n  $log = new HackLogging\\Logger('hack-logging', vec[\n    new HackLogging\\Handler\\StdHandler($write),\n  ]);\n\n  await $log-\u003ewriteAsync(\n    HackLogging\\LogLevel::DEBUG,\n    'hacklogging-test',\n  );\n}\n```\n\n### FilesystemHandler\n\n```hack\nuse namespace HackLogging;\nuse namespace HH\\Lib\\File;\nuse function bin2hey();\nuse function random_bytes;\nuse function sys_get_temp_dir;\n\nasync function fvAsync(): Awaitable\u003cvoid\u003e {\n  $filename = sys_get_temp_dir() . '/' . bin2hex(random_bytes(16));\n  $file = File\\open_write_only($filename);\n  $log = new HackLogging\\Logger('hack-logging', vec[\n    new HackLogging\\Handler\\FilesystemHandler($file),\n  ]);\n  await $log-\u003ewriteAsync(\n    HackLogging\\LogLevel::DEBUG,\n    'hacklogging-test',\n    dict[\n      'context' =\u003e vec['nice'],\n    ],\n  );\n}\n```\n","funding_links":["https://github.com/sponsors/ytake"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytake%2Fhack-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytake%2Fhack-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytake%2Fhack-logging/lists"}