{"repo":"google/deck","free":true,"listed":false,"github":"https://github.com/google/deck","clone":"git clone https://github.com/google/deck.git","description":"Deck provides a flexible logging framework for Go apps.","language":"Go","stars":59,"topics":["logging"],"license":"Apache-2.0","category":"analytics","readme_excerpt":"Deck - Flexible Logging Framework for Go The Deck package provides a flexible logging framework for Go apps. Deck supports Windows Event Log, syslog, Go's standard logging, logging to file, and log replays for testing. Deck is extensible, so new log backends can integrate seamlessly into existing application code. Standard Logging Deck can be a drop in replacement for some other logging packages, with support for common functions like Info, Error, & Warning. The standard logging functions write their outputs immediately and don't support additional attributes. Extensible Logging with Attributes Sometimes we want to be able to pass more complex inputs to our log messages. Deck facilitates this by allowing custom attributes to be attached to log messages. When using the A ttribute-supporting log functions, the message isn't output immediately. We use the With() function to attach additional metadata to the message first. The metadata can be anything supported by an attached backend. Once fully marked up with attributes, the Go() function then performs the final write of the message. In this example, a log message is marked with Verbosity level 2. Verbosity can be used to dynamically show or hide log events at runtime. The EventLog backend for Windows supports Event IDs: Multiple attributes can be attributed to the same message: Backends Deck's logging functionality revolves around backends . A backend is any logging destination that deck should write messages to. Backends are p","default_branch":null,"files":null,"tree":[],"storefront":"/r/google","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/google/deck/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}