demizer / go-logs

A enhanced logging library for Go.
MIT License
3 stars 0 forks source link

Allow the setting of custom labels #6

Open demizer opened 10 years ago

demizer commented 10 years ago

Relates to #3

The current default label names are fantastic, but maybe someone in the future would like to change them for some reason.

API changes

log.SetLabels(lbls ...Label)
log.Labels() []Label

Notes

This has already been completed.

The Label is a Go type that has the following form:

type Label struct {
        name string
        shortName string
        level level
        colorRGB [3]uint8
}

shortName is used when the Ltree flag is used.