tricorder-observability / Starship

Starship: next-generation Observability platform built with eBPF+WASM
GNU Affero General Public License v3.0
164 stars 24 forks source link

Feature: Add common logger utils for tricorder go #47

Closed jmzwcn closed 1 year ago

jmzwcn commented 1 year ago

There are too many APIs,

Please just provide the exact set of logging APIs that are:

  1. Identical with the std lib's log APIs, i.e., the vanilla log APIs in standard lib, logrus also has the same compatibility.
// We need this API to be identical to standard logging API
import "github.com/tricorder/src/utils/log"
log.Infof("...", ...)
log.Errorf("...", ...)
  1. Just enough APIs to be used, not extra ones

I think we should provide the same features(APIs) compared with standard logrus package, but easier to use for tricorder. Original library is here: https://github.com/sirupsen/logrus/blob/master/exported.go

nascentcore-eng commented 1 year ago

Hasn't been any activity for a while. Close.

jmzwcn commented 1 year ago

Additionally, you need to provide a linter to prevent people from using other forms of logging APIs.

Already added a linter for this logger.