internal

package
v0.0.0-...-c5ff7ba Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 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
Package normalize sanitizes loose YAML input.
Package normalize sanitizes loose YAML input.
Configurable and overridable queries.
Configurable and overridable queries.

Jump to

Keyboard shortcuts

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