An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.9% dependent packages on proxy.golang.org

proxy.golang.org : github.com/Unity-Technologies/go-lager-internal

Lager makes logs that are easy for computers to parse, easy for people to read, and easy for programmers to generate. It also encourages logging data over messages, which tends to make logs more useful as well as easier to generate. You don't need to pass around a logging object so you can log information from any code. You can decorate a Go context.Context with additional data to be added to each log line written when that context applies. The logs are written in JSON format but the items in JSON are written in a controlled order, preserving the order used in the program code. This makes the logs pretty easy for humans to scan even with no processing or tooling. Typical logging code like: could output (especially when running interactively): (but as a single line). If you declare that the code is running inside Google Cloud Platform (GCP), it could instead output: (as a single line) which GCP understands well but note that it is still easy for a human to read with the consistent order used. You don't even need to take the time to compose and type labels for data items, if it doesn't seem worth it in some cases: There are 11 log levels and 9 can be independently enabled or disabled. You usually use them via code similar to: Panic and Exit cannot be disabled. Fail, Warn, Note, and Acc are enabled by default. If you want to decorate each log line with additional key/value pairs, then you can accumulate those in a context.Context value that gets passed around and then pass that Context in when logging: Most log archiving systems expect JSON log lines to be a map (object/hash) not a list (array). To get that you just declare what labels to use for: timestamp, level, message, list data, context, and module. Support for GCP Cloud Logging and Cloud Trace is integrated.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/%21unity-%21technologies/go-lager-internal
License: Unlicense
Latest release: about 2 years ago
First release: about 5 years ago
Namespace: github.com/Unity-Technologies
Dependent packages: 2
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 20 days ago

    Loading...
    Readme
    Loading...