logger

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package logger provides functions to manage the CookieFarm client logging.

Index

Constants

View Source
const (
	Reset   = "\033[0m"
	Red     = "\033[31m"
	Green   = "\033[32m"
	Yellow  = "\033[33m"
	Blue    = "\033[34m"
	Magenta = "\033[35m"
	Cyan    = "\033[36m"
	Gray    = "\033[37m"
	White   = "\033[97m"
)

Variables

View Source
var (
	LogLevel zerolog.Level  // LogLevel defines the log level for the logger.
	Log      zerolog.Logger // Log is the logger instance for the CookieFarm client.
	LogFile  *os.File       // logFile represents the log file for the CookieFarm client.

)

Functions

func Close

func Close()

Close shuts down the logger by closing the log file if it is open.

func GetBanner

func GetBanner(data string) string

func IsCompletionCommand added in v1.2.1

func IsCompletionCommand() bool

func SetTUI

func SetTUI(value bool)

SetTUI sets the useTUI variable to enable or disable TUI mode for logging.

func Setup

func Setup(level string, file bool) string

Setup configures the logger with the specified log level and returns the log file path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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