{"id":37154678,"url":"https://github.com/lillilli/logger","last_synced_at":"2026-01-14T18:17:49.651Z","repository":{"id":57496608,"uuid":"175172851","full_name":"lillilli/logger","owner":"lillilli","description":"Simple golang logger broker under hashicorp/logutils.","archived":false,"fork":false,"pushed_at":"2020-05-29T10:07:43.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-10T23:25:57.833Z","etag":null,"topics":["golang","logging","logging-library"],"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/lillilli.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":"2019-03-12T09:01:48.000Z","updated_at":"2019-07-23T09:59:59.000Z","dependencies_parsed_at":"2022-09-02T01:21:21.605Z","dependency_job_id":null,"html_url":"https://github.com/lillilli/logger","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/lillilli/logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lillilli%2Flogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lillilli%2Flogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lillilli%2Flogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lillilli%2Flogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lillilli","download_url":"https://codeload.github.com/lillilli/logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lillilli%2Flogger/sbom","scorecard":{"id":589860,"data":{"date":"2025-08-11","repo":{"name":"github.com/lillilli/logger","commit":"8f249b316b4dc724da05050139b0adb8e73cabc5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/6 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":"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":"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":"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":"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":"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":"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":"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 '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":"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-20T21:34:47.576Z","repository_id":57496608,"created_at":"2025-08-20T21:34:47.576Z","updated_at":"2025-08-20T21:34:47.576Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28430272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["golang","logging","logging-library"],"created_at":"2026-01-14T18:17:49.008Z","updated_at":"2026-01-14T18:17:49.643Z","avatar_url":"https://github.com/lillilli.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logger\n\n[![Go Report Card](https://goreportcard.com/badge/lillilli/jsonrpc)](https://goreportcard.com/report/lillilli/logger)\n[![GoDoc](https://godoc.org/github.com/lillilli/jsonrpc?status.svg)](https://godoc.org/github.com/lillilli/logger)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/lillilli/logger/master/LICENSE)\n\nSimple logger broker build upon [hashicorp/logutils](https://github.com/hashicorp/logutils).\n\n## Description\n\nSimple logger, that implement specified interface (logger.Logger). That logger can log into anything, that implemented io.Writer interface.\n\n## Base\n\nLogger params setup by one call of Init(logger.Prams) method:\n\n```go\n// Params - logger params\ntype Params struct {\n  // Output interface\n  Writer   io.Writer\n  // Log levels\n  Levels   []string\n  // Min log level (all logs, that stand before that level will not be logged)\n  MinLevel string\n}\n```\n\nLogger interface:\n\n```go\n// Logger - logger interface\ntype Logger interface {\n  Debug(msg string)\n  Debugf(msg string, args ...interface{})\n\n  Info(msg string)\n  Infof(format string, args ...interface{})\n\n  Warn(msg string)\n  Warnf(format string, args ...interface{})\n\n  Error(msg string)\n  Errorf(format string, args ...interface{})\n\n  Fatal(msg string)\n  Fatalf(format string, args ...interface{})\n}\n```\n\n### Log format\n\n```bash\n# \u003cdata\u003e \u003ctime\u003e \u003cseverity\u003e \u003cmodule\u003e: \u003cmessage\u003e\n\n2018/05/08 09:28:49 [INFO] service: Starting...\n```\n\n## Usage examples\n\n### stderr\n\n```go\npackage main\n\nimport (\n  \"github.com/lillilli/logger\"\n)\n\ntype Service struct {\n  log logger.Logger\n}\n\nfunc NewService() *Service {\n  return \u0026Service{\n    log: logger.NewLogger(\"service name\"),\n  }\n}\n\nfunc (s *Service) SayHi(name string) {\n  s.log.Infof(\"Saying hi to %s\", name)\n}\n\nfunc main() {\n  service := NewService()\n  service.SayHi(\"Alex\")\n\n  // Output:\n  // 2019/03/12 11:56:53 [INFO] service name: Saying hi to Alex\n}\n```\n\n### GELF (graylog)\n\n```go\nimport \"gopkg.in/Graylog2/go-gelf.v1/gelf\"\n\ngelfWriter, err := gelf.NewWriter(\"localhost:12201\")\nif err != nil {\n  return errors.Wrap(err, \"unable to create gelf writer\")\n}\n```\n\n### syslog\n\n```go\nimport (\n\t\"log\"\n\t\"log/syslog\"\n\n\t\"github.com/lillilli/logger\"\n)\n\nfunc main() {\n  logWriter, err := syslog.New(syslog.LOG_NOTICE, \"service_name\")\n\n  if err != nil {\n    log.Fatalf(\"Unable to create syslog writer: %v\", err)\n  }\n\n  logger.Init(logger.Params{\n    Writer: logWriter,\n  })\n\n  log := logger.NewLogger(\"service\")\n  log.Info(\"I'm going to syslog\")\n}\n```\n\n### rsyslog (udp)\n\n```go\nlogWriter, err := syslog.Dial(\"udp\", \"rsyslog:514\", syslog.LOG_NOTICE, \"service_name\")\n\nif err != nil {\n  return errors.Wrap(err, \"unable to create syslog writer\")\n}\n```\n\n### rsyslog (tcp)\n\n```go\nlogWriter, err := syslog.Dial(\"tcp\", \"rsyslog:10514\", syslog.LOG_NOTICE, \"service_name\")\n\nif err != nil {\n  return errors.Wrap(err, \"unable to create syslog writer\")\n}\n```\n\n## License\n\nReleased under the [MIT License](https://github.com/lillilli/logger/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flillilli%2Flogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flillilli%2Flogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flillilli%2Flogger/lists"}