log

package
v0.0.0-...-7c31ad9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Helper functions for emitting structured logs to the rio.Monitor.

These functions encompass most common lifecycle events in a transmat, and using them A) saves typing and B) keeps the common stuff formatted in a common way between transmats. Transmats can of course also write their own log events raw; it is freetext.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheHasIt

func CacheHasIt(mon rio.Monitor, ware api.WareID)

func DirectoryInferred

func DirectoryInferred(mon rio.Monitor, inferred, path fs.RelPath)

Emit debug log entry for implicit parent dir creation. This is mostly a tar thing and probably shouldn't be in the general mixins; the fact that it's here is a hint that we need some serious refactor on logs.

ALSO a FIXME: we would like to comment on the wareID here, but in calling contexts, that's *not actually topically relevant*... we need logger helpers that handle this.

func MirrorNoop

func MirrorNoop(mon rio.Monitor, wh api.WarehouseLocation, ware api.WareID)

func WareNotFound

func WareNotFound(mon rio.Monitor, err error, wh api.WarehouseLocation, ware api.WareID)

Log path for a 'rio.ErrWareNotFound'.

func WareObjCacheHit

func WareObjCacheHit(mon rio.Monitor, ware api.WareID)

This logs a cache hit where the "object store" (as git calls it, for example) has the object we need -- as opposed to our fileset cache, which presumably has already missed, or we would've returned that already. It means we *aren't* doing network ops, but an unpacking still needs to run.

func WareReaderOpened

func WareReaderOpened(mon rio.Monitor, wh api.WarehouseLocation, ware api.WareID)

func WarehouseUnavailable

func WarehouseUnavailable(mon rio.Monitor, err error, wh api.WarehouseLocation, ware api.WareID, mode string)

Log path for a 'rio.ErrWarehouseUnavailable'; mode is "read" or "write".

Types

This section is empty.

Jump to

Keyboard shortcuts

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