{"id":15021280,"url":"https://github.com/eltorocorp/nobslogger","last_synced_at":"2026-03-08T14:38:08.861Z","repository":{"id":57546515,"uuid":"300508512","full_name":"eltorocorp/nobslogger","owner":"eltorocorp","description":"NobSlogger. A fast, opinionated, lightweight, no BS, static structured logger.","archived":false,"fork":false,"pushed_at":"2020-10-14T05:05:20.000Z","size":3637,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-12T01:09:56.405Z","etag":null,"topics":["elasticsearch","elk","go","golang","logger","logging","logstash","udp"],"latest_commit_sha":null,"homepage":"","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/eltorocorp.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":"2020-10-02T05:17:37.000Z","updated_at":"2020-10-14T05:04:13.000Z","dependencies_parsed_at":"2022-09-05T10:51:04.327Z","dependency_job_id":null,"html_url":"https://github.com/eltorocorp/nobslogger","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltorocorp%2Fnobslogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltorocorp%2Fnobslogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltorocorp%2Fnobslogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eltorocorp%2Fnobslogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eltorocorp","download_url":"https://codeload.github.com/eltorocorp/nobslogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241355040,"owners_count":19949292,"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":["elasticsearch","elk","go","golang","logger","logging","logstash","udp"],"created_at":"2024-09-24T19:56:23.697Z","updated_at":"2026-03-08T14:38:08.813Z","avatar_url":"https://github.com/eltorocorp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :cow: NobSlogger \nNobSlogger. A fast, opinionated, lightweight, no-BS, static-structured/leveled logger.\n\n[![godoc](http://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://pkg.go.dev/github.com/eltorocorp/nobslogger/v2/logger)\n[![Go Report Card](https://goreportcard.com/badge/github.com/eltorocorp/nobslogger/v2)](https://goreportcard.com/report/github.com/eltorocorp/nobslogger/v2)\n[![license](http://img.shields.io/badge/license-MIT-red.svg?style=flat)](https://raw.githubusercontent.com/eltorocorp/nobslogger/master/LICENSE)\n[![Coverage](http://gocover.io/_badge/github.com/eltorocorp/nobslogger/v2/logger)](http://gocover.io/github.com/eltorocorp/nobslogger/logger/v2)\n\nNo BS:\n - NobSlogger is opinionated. \n - It has a staticly structured log format that is focused on use for microservice activity logs.\n - It is focused on providing structured information that helps identify what is happening, where it is happening, and in what order it is happening, so that issues can be identified quickly.\n - If you want more flexibility on which fields you want to log or how they are formatted, use Zap or Zerolog.\n - If you just want something that is minimal, fast, and doesn't deal with any BS, then use this.\n\n# Installation\n\n`go get -u github.com/eltorocorp/nobslogger/v2`\n\n# Performance\n\nNobSlogger is very opinionated. And it is fast as a result\\*.\n|Package|Time|Time %|Allocations|\n|-------|----|------|-----------|\n|:cow: eltorocorp/logger.Info-4 |309  ns/op|    0%|0  allocs/op|\n|:cow: eltorocorp/logger.InfoD-4         |324  ns/op|    5%|0  allocs/op|\n|rs/zerolog.Check-4       |355  ns/op|   15%|0  allocs/op|\n|rs/zerolog-4             |357  ns/op|   16%|0  allocs/op|\n|Zap-4         |476  ns/op|   54%|0  allocs/op|\n|Zap.Check-4   |505  ns/op|   63%|0  allocs/op|\n|Zap.Sugar-4   |971  ns/op|  214%|2  allocs/op|\n|go-kit/kit/log-4         |3189  ns/op|  932%|24  allocs/op|\n|apex/log-4    |8199  ns/op| 2553%|25  allocs/op|\n|sirupsen/logrus-4        |8556  ns/op| 2669%|37  allocs/op|\n|inconshreveable/log15-4  |9620  ns/op| 3013%|31  allocs/op|\n\n\u003e *\\*NobSlogger's benchmarks are based on the accumulated context benchmark suite used by the Zap and Zerolog loggers. Additional benchmarks (single field, and adding fields) are available in the benchmarks directory. \n\n# Log Structure\nAs mentioned in the No BS section above, NobSlogger gets its performance by being very opinionated about what constitutes a log entry. It does not try to be all things to all people, but does succeed at doing what will work for most scenarios really well.\n\nLogs are structred at three levels. The Service, Context, and Entry (described in more detail below).\nEach structural level presents progressively more detail about the context within which each log entry occurs. This is designed to help identify what, where, and when things are going on with a system without getting bogged down in too much BS.\n\n## Log Service Level\n*Values applied to all logs within this instance across all goroutines and contexts.*\n- Environment: *The deployment stage this service is active within. i.e. \"stage\", \"dev\", \"prod\", etc.*\n- System Name: *The name of the broader system within which this service participates.*\n- Service Name: *The name of this service in particular.*\n- Service Instance ID: *An ID that uniquely designates this service instance independent from other parallel instances within the current environment and system.*\n\n## Log Context Level\n*Values applied in a more narrow context. Typically within a package, or other \"sub-module\" within a service.*\n\n- Site: *The general region to which logs for the current context apply.*\n- Operation *The general operation being performed within this region of the system.*\n\n## Log Entry Level\n*Values that are specific to a discrete log entry.*\n\n- Timestamp: *RFC3339Nano (2006-01-02T15:04:05.999999999Z07:00)*\n- Message: *A concrete message describing system state.*\n- Detail: *Additional information in support of the message.*\n- Severity: *A value describing the nature of the log message. One of trace, debug, info, warn, error, or fatal.*\n- Level: *A numeric value with respect to the log severity. One of 100, 200, 300, 400, 500, 600.*\n\n# Examples\n\n- view examples in the docs [here](https://pkg.go.dev/github.com/eltorocorp/nobslogger/v2/logger#pkg-examples)\n- or view the same examples in code [here](v2/logger/examples_test.go)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feltorocorp%2Fnobslogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feltorocorp%2Fnobslogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feltorocorp%2Fnobslogger/lists"}