Ecosyste.ms: Packages

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

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/reiver/go-flog

Package flog provides structured and formatted logging. Basic usage of the flogger looks like this: Once you have the flogger, you can do things such as: BTW, if the PrettyWritingRouter was being used, then this: Would generate output like the following: (Although note that in actual usage this would have color.) (Note that for for other routers the actual output would look very different! What the output looks like is router dependent.) But those method calls all generated unstructure data. To include structured data the flogger's With method needs to be used. For example: Then if the PrettyWritingRouter was being used, then this: Would generate output like the following: (Again, note that in actual usage this would have color.) Of course in a real application system you should (probably) create a different kind of flogger for each deployment environment. Even though the PrettyWritingRouter is great for a development deployment environment (i.e., "DEV") it is probably not appropriate for a production deployment environment (i.e., "PROD"). For example: In addition to the builtin routers that go-flog comes with, other external routers are also available. These include: go-slackchannelrouter: Makes it so log messages get posted to a Slack channel. https://github.com/reiver/go-slackchannelrouter

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/reiver/go-flog
License: MIT
Latest release: almost 5 years ago
First release: over 5 years ago
Namespace: github.com/reiver
Last synced: 7 days ago

    Loading...
    Readme
    Loading...