{"id":18016590,"url":"https://github.com/webassembly/wasi-logging","last_synced_at":"2025-03-26T18:32:22.326Z","repository":{"id":145105873,"uuid":"523463719","full_name":"WebAssembly/wasi-logging","owner":"WebAssembly","description":"WASI logging API","archived":false,"fork":false,"pushed_at":"2024-10-02T17:40:45.000Z","size":19,"stargazers_count":21,"open_issues_count":4,"forks_count":7,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-22T06:41:51.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/WebAssembly.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-08-10T18:58:59.000Z","updated_at":"2024-12-29T17:25:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"c46221a3-e98d-447f-b9d8-ba06111a3f65","html_url":"https://github.com/WebAssembly/wasi-logging","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"WebAssembly/wasi-proposal-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebAssembly%2Fwasi-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebAssembly","download_url":"https://codeload.github.com/WebAssembly/wasi-logging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245713053,"owners_count":20660340,"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-10-30T04:18:34.042Z","updated_at":"2025-03-26T18:32:22.020Z","avatar_url":"https://github.com/WebAssembly.png","language":null,"readme":"# WASI Logging\n\nA proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) API.\n\n### Current Phase\n\nWASI-logging is currently in [Phase 1].\n\n[Phase 1]: https://github.com/WebAssembly/WASI/blob/42fe2a3ca159011b23099c3d10b5b1d9aff2140e/docs/Proposals.md#phase-1---proposed-spec-text-available-cg--wg\n\n### Champions\n\n- Dan Gohman\n\n### Phase 4 Advancement Criteria\n\nThe Phase 4 Adancement Criteria for this API are not yet defined.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Goals](#goals)\n- [Non-goals](#non-goals)\n- [API walk-through](#api-walk-through)\n  - [Logging use case](#logging-use-case)\n  - [Stderr use case](#stderr-use-case)\n- [Detailed design discussion](#detailed-design-discussion)\n  - [What levels should there be?](#what-levels-should-there-be)\n- [Stakeholder Interest \u0026 Feedback](#stakeholder-interest--feedback)\n- [References \u0026 acknowledgements](#references--acknowledgements)\n\n### Introduction\n\nWASI Logging is a WASI API for emitting log messages.\n\n### Goals\n\nThe primary goal of WASI logging is to be a simple logging API usable\nas a stderr destination in commands and as a logging output in headless\nprograms.\n\n### Non-goals\n\nWASI Logging is not aiming to be a general-purpose output stream, with\nsupport for error reporting or asynchronous operation.\n\n### API walk-through\n\nThere are two main use cases.\n\n#### Logging use case\n\nThe logging API can be used to log simple messages:\n\n```\n   log(Level::Info, \"fyi\", \"The program is running\");\n```\n\n#### Stderr use case\n\nThe logging API can be used as an output for a command-style stderr.\n\n```\n   log(Level::Info, \"stderr\", \"Message printed to stderr in a command\");\n```\n\n### Detailed design discussion\n\n### What levels should there be?\n\nThe log levels are similar to those of [log4j], the [Rust log crate], the\n[Python log levels], the [Ruby log levels], the [.NET log levels], the\n[Go zap library log levels], and the [Go zerolog library levels].\n\nAnother similar API is the POSIX `syslog` function. `LOG_EMERG` and `LOG_ALERT`\nhave no corresponding levels, because WASI programs don't have visibility into\nhow their own errors affect \"the system\" as a whole. A `Critical` level should\nbe used instead, optionally with a trap if it's desirable to halt execution.\nSimilarly, `LOG_NOTICE` and `LOG_INFO` both correspond to `Info`, because most\nof the popular systems don't make a distinction between these levels.\n\n[log4j]: https://logging.apache.org/log4j/2.x/manual/customloglevels.html\n[Rust log crate]: https://docs.rs/log/latest/log/enum.Level.html\n[Python log levels]: https://docs.python.org/3/library/logging.html#levels\n[Ruby log levels]: https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html\n[.NET log levels]: https://docs.microsoft.com/en-us/dotnet/core/extensions/logging?tabs=command-line#log-level\n[Go zap library log levels]: https://pkg.go.dev/go.uber.org/zap/zapcore#Level\n[Go zerolog library levels]: https://github.com/rs/zerolog#leveled-logging\n\n### What should the context be?\n\nCurrently the context parameter is an uninterpreted string, because it's the\nsimplest thing that works for now. It may evolve into something else though.\n\n### Stakeholder Interest \u0026 Feedback\n\nTODO before entering Phase 3.\n\n### References \u0026 acknowledgements\n\nMany thanks for valuable feedback and advice from:\n\n- Luke Wagner\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebassembly%2Fwasi-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebassembly%2Fwasi-logging/lists"}