{"id":37801594,"url":"https://github.com/thehungry-dev/log","last_synced_at":"2026-01-16T15:26:41.921Z","repository":{"id":57621447,"uuid":"378560823","full_name":"thehungry-dev/log","owner":"thehungry-dev","description":"Fast, composable structured and unstructured logging for Go based on Cog","archived":false,"fork":false,"pushed_at":"2021-06-25T05:53:20.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T10:14:01.079Z","etag":null,"topics":["go","golang","logging"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/thehungry-dev.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}},"created_at":"2021-06-20T04:49:55.000Z","updated_at":"2024-06-20T10:14:01.080Z","dependencies_parsed_at":"2022-09-26T20:10:28.746Z","dependency_job_id":null,"html_url":"https://github.com/thehungry-dev/log","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/thehungry-dev/log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehungry-dev%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehungry-dev%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehungry-dev%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehungry-dev%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thehungry-dev","download_url":"https://codeload.github.com/thehungry-dev/log/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thehungry-dev%2Flog/sbom","scorecard":{"id":878761,"data":{"date":"2025-08-11","repo":{"name":"github.com/thehungry-dev/log","commit":"13a10a01f73bd97d3e78c8fb9207b22507a2a5e6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T07:09:53.537Z","repository_id":57621447,"created_at":"2025-08-24T07:09:53.537Z","updated_at":"2025-08-24T07:09:53.537Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["go","golang","logging"],"created_at":"2026-01-16T15:26:41.166Z","updated_at":"2026-01-16T15:26:41.908Z","avatar_url":"https://github.com/thehungry-dev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Log\n\nFast, composable structured and unstructured logging for Go\n\n![Terminal output written using log](assets/log_example.jpg)\n\n## Usage\n\n```go\nlog.\n  Tags(\"data\", \"trace\").\n  Data(\n    log.String(\"SomeKey\", \"some value\"),\n    log.Int(\"SomeOtherKey\", 123),\n    log.Private.String(\"SomePrivateKey\", \"a value\"),\n  ).\n  Trace(\"trace msg\")\n\nlog.\n  Tags(\"data\", \"debug\").\n  Data(\n    log.String(\"SomeKey\", \"some value\"),\n    log.Int(\"SomeOtherKey\", 123),\n    log.Bool(\"SomeBool\", true),\n  ).\n  Debugd()\n\nlog.Info(\"info message\")\n\nlog.\n  JSON.\n  Tags(\"data\", \"warn\").\n  Data(\n    log.String(\"SomeKey\", \"some value\"),\n    log.Int(\"SomeOtherKey\", 123),\n    log.Bool(\"SomeBool\", true),\n  ).\n  Warn(\"warn message\")\n\nlog.Errorf(\"error %s\", \"message\")\n\nlog.\n  Tags(\"fatal\").\n  Fatal(\"fatal msg\")\n```\n\n## Configuration\n\nThe logger can be controlled using environment variables. The following is a list of all configuration options.\n\n| Name                | Values                                                                                             | Default                                              | Description                                                                                                                                                   |\n|---------------------|----------------------------------------------------------------------------------------------------|------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `LOG_COLOR`         | `on`, `off`                                                                                        | If outputting to TTY, `on`, otherwise `off`          | Colorize terminal output based on message level                                                                                                               |\n| `LOG_DEVICE`        | `stdout`, `stderr`                                                                                 | `stderr`                                             | Sets the device to which log messages will be written                                                                                                         |\n| `LOG_FILTERS`       | `_none`, `level`, `tag` or a combination of `level` and `tag`. Example: `level,tag` or `tag,level` | `level,tag`                                          | [Filters](#filters)                                                                                                                                           |\n| `LOG_LEVEL`         | `trace`, `debug`, `info`, `warn`, `error`, `fatal`, `_none`, `_all`, `_min`, `_max`                | `_all`                                               | [Level filtering](#level-filtering)                                                                                                                           |\n| `LOG_OUTPUT_FORMAT` | `json`, `text`                                                                                     | `text`                                               | Configure the format of the messages. By default the log is intended for human consumption, setting this to `json` will make it easier to digest for machines |\n| `LOG_TAGS_OUTPUT`   | `on`, `off`                                                                                        | `on`                                                 | Controls if the text output should include tags in the message`                                                                                               |\n| `LOG_TAGS`          | Example: `aTag,+anotherTag,-otherTag,_untagged`, `_all`                                            | No tag filtering applied (every message is included) | [Tag filtering](#tag-filtering)                                                                                                                               |\n\n### Filtering Output\n\nLog output can be filtered through [level filtering](#level-filtering) and [tag filtering](#tag-filtering).\nThe filters are applied in sequence, that is, if a message has been excluded from the output from the level filter, it won't even be processed by tag filtering. Tag filtering will be performed only if the message passed through the level filtering and is going to be included into the output up to this point.\n\n#### Filters\n\nFilters applied can be configured through the `LOG_FILTERS` applied.\nSetting this variable to `_none` removes all sorts of filtering. This means all the messages will be written to the log output, but also **none of the filtering code will be executed**. This could be a valuable performance improvement in a production setting.\n\nAlternatively, filters will be applied in the order they are specified in the `LOG_FILTERS` variable, separated by a comma, similar to a pipeline. The following example demonstrates the usage:\n\n- `level,tag` will execute first the [level filtering](#level-filtering) (which is lighter on resources) and then the [tag filtering](#tag-filtering)\n- `level` will _only_ execute level filtering\n- `tag,level` will execute the tag filtering (heavier on resources) and _then_ the level filtering\n- `tag` will execute only tag filtering\n\nThe default value, when the variable is unset, is `level,tag`.\n\n#### Level Filtering\n\nLevels are incremental. Each level is _greater_ than the previous one, according to the following sequence:\n\n- `trace`\n- `debug`\n- `info`\n- `warn`\n- `error`\n- `fatal`\n\n`LOG_LEVEL` configuration helps filtering which messages will be written.\nSetting `LOG_LEVEL` to a specific level will ensure that any message with a level _lower_ than the selected one, will be omitted.\n\nIf the level is set to `info`, all messages of `info` level or above will be written.\n\n`_none` will ensure no messages are going to be witten, `_all` and `_min` are equivalent to `trace`, while `_max` is equivalent to `fatal`\n\n#### Tag Filtering\n\nTag filtering allows finer-grained control of messages included or excluded from the log output.\n\nSetting `LOG_TAGS` to `_all` will ensure no message is excluded from the output due to tag filtering. When `LOG_TAGS` is set to `_all`.\n\nIf `LOG_TAGS` is not set to `_all`, it should contain a list of tags separated by comma. If the message has at least one of the tags listed in `LOG_TAGS`, it will be included in the output.\nA tag can be prefixed with a _modifier_, which is either `+` or `-`.\n\nA tag prefixed with `+` **must be present on the message**. If multiple tags are prefixed with `+` they must all be present on the message. That means that a message must have every tag prefixed with a `+` and **at least one unprefixed tag** (if any present in `LOG_TAGS`).\n\nIf a tag is prefixed with `-`, it must be absent from the list of tags of the message.\n\nEvery untagged message (a message with no tags) is excluded from the output unless the keyword `_untagged` is present in the tag list.\n\n##### Examples\n\n###### `foo,tag1,_untagged,+bar,+baz`\n\nA message to be included in the output must satisfy **all the following conditions**:\n\n- Have at least one of: `foo` or `tag1`\n- Have **both**: `bar` and `baz`\n\nAlternatively the message could be untagged and it will be included in the output\n\n###### `foo,tag1,+bar,-baz`\n\n\nA message to be included in the output must satisfy **all the following conditions**:\n\n- Have at least one of: `foo` or `tag1`\n- Have: `bar`\n- **Not have**: `baz`\n\n## Development\n\n### Testing\n\nRequirements:\n\n- `bash` version `\u003e= 5.0.0`\n- `sed` version `\u003e= 4.5.0`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehungry-dev%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthehungry-dev%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthehungry-dev%2Flog/lists"}