https://github.com/galdor/go-log
Hierarchical logging for Golang.
https://github.com/galdor/go-log
go golang logger logging
Last synced: 5 months ago
JSON representation
Hierarchical logging for Golang.
- Host: GitHub
- URL: https://github.com/galdor/go-log
- Owner: galdor
- License: isc
- Created: 2023-04-30T11:19:06.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-08-20T15:53:43.000Z (almost 2 years ago)
- Last Synced: 2025-05-23T06:17:26.254Z (about 1 year ago)
- Topics: go, golang, logger, logging
- Language: Go
- Homepage:
- Size: 123 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-log
## Introduction
The go-log library provides hierarchical loggers with a simple interface and
support for multiple backends.

## Usage
Go-log supports hierarchical logging: loggers are identified by a domain, a
multi-part string identifying the software component they are part of. This is
extremely useful when filtering large quantity of log messages in complex
software.
Loggers can create children. The domain of a child logger starts with the
domain of its parent; it also inherits its set of data.
Go-log currently supports the following backends:
- `terminal`: write human-readable log messages to the standard error output.
- `json`: write log messages encoded as JSON objects to the standard error
output.
Refer to the [Go package documentation](https://pkg.go.dev/go.n16f.net/log) for
information about the API, and see the [`example`](cmd/example/example.go)
program.
The [go-service](https://go.n16f.net/service) library demonstrates how to use
go-log loggers for larger programs.
# Licensing
Go-log is open source software distributed under the
[ISC](https://opensource.org/licenses/ISC) license.