logging

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Overview

Package logging contains data structures useful to implement logging across ndt-server in a Docker friendly way.

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.Logger{
	Handler: json.New(os.Stderr),
	Level:   log.InfoLevel,
}

Logger is a logger that logs messages on the standard error in a structured JSON format, to simplify processing. Emitting logs on the standard error is consistent with the standard practices when dockerising an Apache or Nginx instance.

Functions

func MakeAccessLogHandler

func MakeAccessLogHandler(handler http.Handler) http.Handler

MakeAccessLogHandler wraps |handler| with another handler that logs access to each resource on the standard output. This is consistent with the way in which Apache and Nginx are dockerised. We do not emit JSON access logs, because access logs are a fairly standard format that has been around for a long time now, so better to follow such standard.

Types

This section is empty.

Jump to

Keyboard shortcuts

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