models

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The available log levels
	LevelVerbose = iota // 0
	LevelDebug          // 1
	LevelInfo           // 2
	LevelWarning        // 3
	LevelError          // 4
	LevelFatal          // 5

	MaxLenTag  = 24 // The maximum length of a tag for the terminal UI
	MaxLenTime = 13 // The maximum length of a time for the terminal UI
	MaxLenPid  = 5  // The maximum length of a pid/tid for the terminal UI
)

Variables

View Source
var (
	LevelMap = map[string]int{
		"V": LevelVerbose,
		"D": LevelDebug,
		"I": LevelInfo,
		"W": LevelWarning,
		"E": LevelError,
		"F": LevelFatal,
	}
)

Functions

This section is empty.

Types

type LogcatEntry

type LogcatEntry struct {
	Date    string `json:"date"`
	Time    string `json:"time"`
	Level   string `json:"level"`
	Tag     string `json:"tag"`
	PID     string `json:"pid"`
	TID     string `json:"tid"`
	Message string `json:"message"`
}

func (LogcatEntry) FormatAnsiString added in v0.1.1

func (entry LogcatEntry) FormatAnsiString(showTime bool, showPid bool) string

func (LogcatEntry) GetFormattedPidTid

func (entry LogcatEntry) GetFormattedPidTid() string

func (LogcatEntry) Print

func (entry LogcatEntry) Print()

Prints a logcat line with colors

func (LogcatEntry) ToAnsiString

func (entry LogcatEntry) ToAnsiString() string

func (LogcatEntry) ToFile

func (entry LogcatEntry) ToFile(fh *os.File) (err error)

Writes a logcat line to a file

func (LogcatEntry) ToString

func (entry LogcatEntry) ToString() string

type NoDataError

type NoDataError struct {
	Message string
}

func (NoDataError) Error

func (e NoDataError) Error() string

Jump to

Keyboard shortcuts

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