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 ¶
- func Close() error
- func Error(v ...any)
- func Errorf(format string, v ...any)
- func Fatal(v ...any)
- func Fatalf(format string, v ...any)
- func GetNErrs() int
- func Info(v ...any)
- func Infof(format string, v ...any)
- func InitGCP(ctx context.Context, projectID string) error
- func InitGCPWithClient(ctx context.Context, c *gcpLog.Client)
- func Warning(v ...any)
- func Warningf(format string, v ...any)
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 Fatal ¶
func Fatal(v ...any)
Fatal is equivalent to logging to Error() 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 InitGCP ¶
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 ¶
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".
Types ¶
This section is empty.