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 ¶
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. |
Click to show internal directories.
Click to hide internal directories.