gcplog

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentProject

func CurrentProject() (string, error)

CurrentProject returns the current GCP project ID where the application is running.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger represents a logging object.

func New

func New(module string, lvl logger.Level) (*Logger, error)

New initializes a new logger

func (*Logger) Close added in v0.2.1

func (l *Logger) Close() error

func (*Logger) Debug

func (l *Logger) Debug(msg string)

func (*Logger) Debugf

func (l *Logger) Debugf(format string, values ...any)

func (*Logger) Error

func (l *Logger) Error(msg string)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, values ...any)

func (*Logger) Fatal

func (l *Logger) Fatal(msg string)

func (*Logger) Fatalf

func (l *Logger) Fatalf(format string, values ...any)

func (*Logger) Info

func (l *Logger) Info(msg string)

func (*Logger) Infof

func (l *Logger) Infof(format string, values ...any)

func (*Logger) Print added in v0.2.1

func (l *Logger) Print(msg ...any)

func (*Logger) Printf added in v0.2.1

func (l *Logger) Printf(format string, values ...any)

func (*Logger) SetLvl

func (l *Logger) SetLvl(lvl logger.Level)

SetLvl will set the global logger to a different Loglevel.

func (*Logger) Warn

func (l *Logger) Warn(msg string)

func (*Logger) Warnf

func (l *Logger) Warnf(format string, values ...any)

func (*Logger) Write

func (l *Logger) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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