logger

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logger is a shim over different implementations of the Go Standard Logger. By default this package logs to stdout and stderr. InitGCP can be called to log to GCP Logging. Close should be called at the end of the program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close should be called before the program exits to flush any buffered log entries to the GCP Logging service.

func Error

func Error(v ...any)

Error logs with severity Error.

func Errorf

func Errorf(format string, v ...any)

Errorf formats the string and logs with severity Error.

func Fatal

func Fatal(v ...any)

Fatal is equivalent to logging to Error() followed by a call to os.Exit(1).

func Fatalf

func Fatalf(format string, v ...any)

Fatalf is equivalent to logging to Errorf() followed by a call to os.Exit(1).

func GetNErrs

func GetNErrs() int

GetNErrs is for testing purposes. It should not be called until after the logger is closed.

func Info

func Info(v ...any)

Info logs with severity Info.

func Infof

func Infof(format string, v ...any)

Infof formats the string and logs with severity Info.

func InitGCP

func InitGCP(ctx context.Context, projectID string) error

InitGCP initializes the logger to write to GCP Logging. InitGCP should be called once before any logs are written. All logs are written with the logID "bulk-fhir-fetch".

func InitGCPWithClient

func InitGCPWithClient(ctx context.Context, c *gcpLog.Client)

InitGCPWithClient initializes the logger to write to GCP Logging. InitGCPWithClient should be called once before any logs are written. All logs are written with the logID "bulk-fhir-fetch".

func Warning

func Warning(v ...any)

Warning logs with severity Warning.

func Warningf

func Warningf(format string, v ...any)

Warningf formats the string and logs with severity Warning.

Types

This section is empty.

Jump to

Keyboard shortcuts

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