internal

package
v0.0.0-...-43c2f11 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: PostgreSQL Imports: 5 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const LevelChange slog.Level = slog.LevelInfo + 2

Level for changes only. Aka Magnus owns level. See #219

Variables

View Source
var CurrentLevel = slog.LevelInfo

Functions

func SetLoggingHandler

func SetLoggingHandler(level slog.Level, color bool)
Example
package main

import (
	"fmt"
	"log/slog"

	"github.com/dalibo/ldap2pg/internal"
	"github.com/lmittmann/tint"
)

func main() {
	colors := []bool{false, true}
	for _, color := range colors {
		internal.SetLoggingHandler(slog.LevelDebug, color)
		slog.Debug("Lorem ipsum dolor sit amet.", "version", "v1.0")
		slog.Info("Consectetur adipiscing elit.", "vivamus", "ut accumsan elit", "maecenas", 4.23)
		slog.Debug("Tristique nulla ac nisl dignissim.")
		slog.Debug("Eu feugiat velit dapibus. Curabitur faucibus accumsan purus.", tint.Err(nil))
		slog.Warn("Mauris placerat molestie tempor.", "err", nil)
		slog.Error("Quisque et posuere libero.", "err", fmt.Errorf("pouet"))
	}
}
Output:

Types

This section is empty.

Directories

Path Synopsis
Functions to normalize YAML input before processing into data structure.
Functions to normalize YAML input before processing into data structure.
Implement dynamic formatting from LDAP entry.
Implement dynamic formatting from LDAP entry.
fnmatch pattern list
fnmatch pattern list
Configurable and overridable queries.
Configurable and overridable queries.
Default privileges for object owners.
Default privileges for object owners.

Jump to

Keyboard shortcuts

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