Documentation ¶
Index ¶
Constants ¶
View Source
const ( RequestId ContextKey = 0 TxId ContextKey = 1 OPLabel = "op" RequestLabel = "request_id" TxLabel = "tx_number" )
Variables ¶
This section is empty.
Functions ¶
func AddPlaceAndRequestId ¶
AddPlaceAndRequestId добавляет в logger место запуска и идентификатор запроса.
func LogWithCtxData ¶
LogWithCtxData извлекает, при наличии, из контекста идентификатор запроса и номер транзакции и добавляет в logger.
func MustCreate ¶
MustCreate возвращает экземпляр *slog.Logger или останавливает программу, если окружение environment указано неверно.
Types ¶
type ContextKey ¶
type ContextKey int
Click to show internal directories.
Click to hide internal directories.