secre

package
v0.14.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Example
package main

import (
	"os"
	"time"

	"git.fractalqb.de/fractalqb/qblog"
)

func testClock() time.Time {
	loc, _ := time.LoadLocation("Europe/Berlin")
	t := time.Date(1971, time.June, 1, 12, 13, 14, 987654321, loc)
	return t
}

func main() {
	log := qblog.New((&qblog.Config{}).SetWriter(os.Stdout)).WithGroup("secreT")
	log.Handler().(*qblog.SllmHandler).Clock = testClock
	log.Info("foo `bar` baz", `bar`, T(false))
	log.Info("Just a `secret` `arg`",
		`secret`, T(4711),
		`arg`, "password",
	)
}
Output:

06-01 Tu 12:13:14+01 INFO  [secreT] foo `bar:***` baz
06-01 Tu 12:13:14+01 INFO  [secreT] Just a `secret:***` `arg:password`

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func T

func T(any) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL