logx

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright (C) 2026 by saba <contact me via issue>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

In addition, no derivative work may use the name or imply association with this application without prior consent.

Copyright (C) 2026 by saba <contact me via issue>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

In addition, no derivative work may use the name or imply association with this application without prior consent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold

func Bold(s string) string

func Cyan

func Cyan(s string) string

func Dim

func Dim(s string) string

func Errorf

func Errorf(component, format string, args ...any)

func Fatalf

func Fatalf(component, format string, args ...any)

func Green

func Green(s string) string

func Infof

func Infof(component, format string, args ...any)

func InstallStd

func InstallStd()

InstallStd routes the standard library's global logger through logx formatting. It is safe to call multiple times.

func Magenta

func Magenta(s string) string

func Promptf

func Promptf(component, format string, args ...any)

Promptf prints a log-styled prompt without a trailing newline. It is intended for interactive CLI input.

func Red

func Red(s string) string

func Warnf

func Warnf(component, format string, args ...any)

func Yellow

func Yellow(s string) string

Types

type Level

type Level int
const (
	LevelDebug Level = iota
	LevelInfo
	LevelWarn
	LevelError
)

Jump to

Keyboard shortcuts

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