{"repo":"kataras/golog","free":true,"listed":false,"github":"https://github.com/kataras/golog","clone":"git clone https://github.com/kataras/golog.git","description":"A high-performant Logging Foundation for Go Applications. X3 faster than the rest leveled loggers.","language":"Go","stars":338,"topics":["go","golang","logging","log","logger","logs","iris","iris-golang","high-performance","easy-to-use"],"license":"BSD-3-Clause","category":"analytics","readme_excerpt":"✒️ golog golog is a zero-dependency simple, fast and easy-to-use level-based logger written in Go Programming Language. 🚀 Installation The only requirement is the Go Programming Language . Go modules Or edit your project's go.mod file and execute $ go build. $ go build Log Levels Name Method Text Color ---------- ------------------------- ---------- -------------------- \"fatal\" Fatal, Fatalf [FTAL] Red background \"error\" Error, Errorf [ERRO] Red foreground \"warn\" Warn, Warnf, Warningf [WARN] Magenta foreground \"info\" Info, Infof [INFO] Cyan foreground \"debug\" Debug, Debugf [DBUG] Yellow foreground On debug level the logger will store stacktrace information to the log instance, which is not printed but can be accessed through a Handler (see below). Helpers Customization You can customize the log level attributes. Alternatively, to change a specific text on a known log level, you can just call: Integration The golog.Logger is using common, expected log methods, therefore you can integrate it with ease. Take for example the badger database. You want to add a prefix of [badger] in your logs when badger wants to print something. 1. Create a child logger with a prefix text using the Child function, 2. disable new lines (because they are managed by badger itself) and you are ready to GO: Level-based and standard Loggers You can put golog in front of your existing loggers using the Install method. Supporte loggers: - log - slog - logrus Example for log/slog standard package: Example","default_branch":null,"files":null,"tree":[],"storefront":"/r/kataras","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kataras/golog/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."}