{"id":36806530,"url":"https://github.com/lfkeitel/verbose","last_synced_at":"2026-01-12T13:40:27.222Z","repository":{"id":57481497,"uuid":"56929951","full_name":"lfkeitel/verbose","owner":"lfkeitel","description":"Verbose is a plug-and-play Go logging library","archived":false,"fork":false,"pushed_at":"2025-05-12T20:40:37.000Z","size":51,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-12T21:42:07.254Z","etag":null,"topics":["go","golang","logging","logging-library","structured-logging","verbose"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/lfkeitel.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":"2016-04-23T16:44:57.000Z","updated_at":"2025-05-12T20:40:42.000Z","dependencies_parsed_at":"2022-09-26T19:53:08.192Z","dependency_job_id":null,"html_url":"https://github.com/lfkeitel/verbose","commit_stats":null,"previous_names":["dragonrider23/verbose"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/lfkeitel/verbose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfkeitel%2Fverbose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfkeitel%2Fverbose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfkeitel%2Fverbose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfkeitel%2Fverbose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfkeitel","download_url":"https://codeload.github.com/lfkeitel/verbose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfkeitel%2Fverbose/sbom","scorecard":{"id":586829,"data":{"date":"2025-08-11","repo":{"name":"github.com/lfkeitel/verbose","commit":"e809ccda71350dd137dce34a93e7ebb7c5315a67"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"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":"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":"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/24 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":"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":"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":"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":"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 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"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-20T20:44:21.509Z","repository_id":57481497,"created_at":"2025-08-20T20:44:21.509Z","updated_at":"2025-08-20T20:44:21.509Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28339313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","logging-library","structured-logging","verbose"],"created_at":"2026-01-12T13:40:26.519Z","updated_at":"2026-01-12T13:40:27.211Z","avatar_url":"https://github.com/lfkeitel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Verbose - Logging for Go\n\n[![GoDoc](https://godoc.org/github.com/lfkeitel/verbose?status.svg)](https://godoc.org/github.com/lfkeitel/verbose)\n\nVerbose is a library for simple, organized structured logging. Verbose is a very\nflexible library allowing for multiple log outputs and formatters for each\noutput ensuring data is always formatted correctly for each destination.\n\n## Usage\n\nThe easiest way to start with Verbose is to use the package level logger:\n\n```go\nimport (\n    log \"github.com/lfkeitel/verbose/v5\"\n)\n\nfunc main() {\n    log.WithFields(log.Fields{\n        \"path\": \"/\",\n        \"user\": \"Alice\",\n    }).Info(\"Received request\")\n\n    // Or without fields\n    log.Info(\"Hello\")\n}\n```\n\nYou can also create loggers to pass around:\n\n```go\nimport (\n    log \"github.com/lfkeitel/verbose/v5\"\n)\n\nfunc main() {\n    logger := log.New()\n    ft, _ := log.NewFileTransport(\"applogs.txt\") // Ignoring errors\n    logger.AddTransport(ft)\n\n    logger.WithFields(log.Fields{\n        \"path\": \"/\",\n        \"user\": \"Alice\",\n    }).Info(\"Received request\")\n\n    // Or without fields\n    logger.Info(\"Hello\")\n}\n```\n\n## Supported Log Levels\n\n- Debug\n- Info\n- Notice\n- Warning\n- Error\n- Critical\n- Alert\n- Emergency\n- Fatal (calls os.Exit(1))\n\nYou can also use the following functions:\n\n- Print\n- Panic (calls panic() after writing log)\n\nVerbose does not facilitate formatted log message. Instead, structured logging\nis preferred and highly encouraged.\n\n## Structured Logging\n\n```go\nlogger.WithField(\"field 1\", data)\n\nlogger.WithFields(verbose.Fields{\n    \"field 1\": \"value 1\",\n    \"field 2\": 42,\n}).Debug(\"This is a debug message\")\n```\n\nThe fields will be formatted appropriately by the handler.\n\n## Transports\n\nA Logger initially is nothing more than a shell. Without transports it won't do\nanything. This library comes with two transports. You can use your own\ntransports so long as they satisfy the verbose.Handler interface. You can add a\nhandler by calling `logger.AddHandler()`. A Logger will loop through all the\ntransports and send the message to any that report they can handle the log\nlevel.\n\n### TextTransport\n\nThe TextTransport will print colored log messages to stderr. The output can be\nchanged by calling `.SetOutput()` with an io.Writer.\n\n```go\nsh := verbose.NewTextTransport()\n```\n\nThe text transport will use color if the output is a valid terminal. Otherwise\ncolor is disabled. To force color to be enabled or disabled, create a custom\nLineFormatter with color set to true or false.\n\n### FileTransport\n\nThe FileTransport will write log messages to a file. If the file exists, it will\nbe appended to. Otherwise the file will be created.\n\n```go\nfh := verbose.NewFileTransport(path)\n```\n\nThe file transport uses a non-color line formatter by default. You can change\nthe formatter by setting `.Formatter` on the transport object.\n\n## Formatters\n\nA formatter is used to actually construct a log line that a transport will then\nstore or display. This library comes with 3 formatters but anything satisfying\nthe interface can be used.\n\n### Time Format\n\nThe time format used by formatters can be set using the\nFormatter.SetTimeFormat() method. The default time format for included\nformatters is RFC3339: \"2006-01-02T15:04:05Z07:00\". The time format can be any\nvalid Go time format.\n\n### JSONFormatter\n\nThe JSON formatter is great when the logs are being processed by a centralized\nlogging solution or some other computerized system. It will generate a JSON\nobject with the following structure:\n\n```json\n{\n    \"timestamp\": \"1970-01-01T12:00:00Z\",\n    \"level\": \"INFO\",\n    \"logger\": \"app\",\n    \"message\": \"Hello, world\",\n    \"data\": {\n        \"field 1\": \"data 1\",\n        \"field 2\": \"data 2\"\n    }\n}\n```\n\nAny structured fields will go in the data object.\n\n### LineFormatter\n\nThe line formatter is designed to be human readable either for a file that will\nmainly be viewed by humans, or for standard output. A sample output line would\nbe:\n\n```\n1970-01-01T12:00:00Z: INFO: app: message: | \"field 1\": \"value 1\", \"field 2\": \"value 2\"\n```\n\nThe formatter can format with or without color. To change the color setting\nafter creation, set the `.UseColor` field.\n\n### LogfmtFormatter\n\nThe logfmt formatter formats logs into the [logfmt](https://www.brandur.org/logfmt) format.\n\n```\ntimestamp=\"2019-09-17T15:54:51-05:00\" level=INFO logger=\"\" msg=\"This happened\" foo=\"bar\" result=\"3\"\n```\n\n## Release Notes\n\nv5.0.0\n\n- Renamed handlers to transports\n- Simplified API by removing all format and line print functions\n- Simplified Transport and Formatter interfaces\n- Added a package level logger\n- Added [logfmt](https://www.brandur.org/logfmt) formatter\n- Made logger name optional\n- Removed logger store, the library no longer maintains a repository of created\n  loggers\n\nv4.0.0\n\n- Expanded Formatter interface\n    - SetTimeFormat(string)\n- Added generator functions for Formatters\n    - NewJSONFormatter()\n    - NewLineFormatter()\n    - NewColoredLineFormatter()\n- Use RFC3339 as the default time format\n\nv3.0.0\n\n- Expanded Handler interface\n    - SetFormatter(Formatter)\n    - SetLevel(LogLevel)\n    - SetMinLevel(LogLevel)\n    - SetMaxLevel(LogLevel)\n- Added support for formatters\n    - Included formatters:\n        - JSON\n        - Line\n        - Line with Color\n- Use Fatal as the default Handler max for StdOut and FileHandlers\n\nv2.0.0\n\n- Added support for structured logging\n- Removed LogLevelCustom\n- Added [x]ln() functions to be compatible with the std lib logger\n\nv1.0.0\n\n- Initial Release\n\n## Versioning\n\nFor transparency into the release cycle and in striving to maintain backward\ncompatibility, this application is maintained under the Semantic Versioning\nguidelines. Sometimes I screw up, but I'll adhere to these rules whenever\npossible.\n\nReleases will be numbered with the following format:\n\n`\u003cmajor\u003e.\u003cminor\u003e.\u003cpatch\u003e`\n\nAnd constructed with the following guidelines:\n\n- Breaking backward compatibility **bumps the major** while resetting minor and\n  patch\n- New additions without breaking backward compatibility **bumps the minor**\n  while resetting the patch\n- Bug fixes and misc changes **bumps only the patch**\n\nFor more information on SemVer, please visit \u003chttp://semver.org/\u003e.\n\n## License\n\nThis package is released under the terms of the MIT license. Please see LICENSE\nfor more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfkeitel%2Fverbose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfkeitel%2Fverbose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfkeitel%2Fverbose/lists"}