debug

package
v3.4.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: GPL-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CSS = `` /* 1628-byte string literal not displayed */
View Source
var HTML_CLASS_BOLD = "tracer-bold"
View Source
var HTML_CLASS_CODE = "tracer-code"
View Source
var HTML_CLASS_ERROR = "tracer-error"
View Source
var HTML_CLASS_ERROR_MESSAGE = "tracer-error-message"
View Source
var HTML_CLASS_ERROR_STACK = "tracer-error-stack"
View Source
var HTML_CLASS_ERROR_STACK_ITEM = "tracer-error-stack-item"
View Source
var HTML_CLASS_H1 = "tracer-header"
View Source
var HTML_CLASS_H2 = "tracer-subheader"
View Source
var HTML_CLASS_H3 = "tracer-medheader"
View Source
var HTML_CLASS_P = "tracer-paragraph"
View Source
var HTML_CLASS_PRE = "tracer-pre"
View Source
var HTML_CLASS_SETTINGS = "tracer-settings"
View Source
var HTML_CLASS_SPACER = "tracer-spacer"
View Source
var HTML_CLASS_SPACER_XS = "tracer-spacer-xs"

Functions

func Code

func Code(b requestWriter, s string)

func Error

func Error(b requestWriter) *errorBuilder
func Header(b requestWriter, s string)

func HorizontalRule

func HorizontalRule(b requestWriter)

func HorizontalRuleXS

func HorizontalRuleXS(b requestWriter)

func MedHeader

func MedHeader(b requestWriter, s string)

func Paragraph

func Paragraph(b requestWriter, s string)

func Pre

func Pre(b requestWriter, s string)

Pre tag

func RenderRequest

func RenderRequest(b *request.Request)

Render the request to the error page.

func RenderSettings

func RenderSettings(b requestWriter, settings *AppSettings)

func RenderStackTrace

func RenderStackTrace(s tracer.ErrorType, r *request.Request)

func RenderStdInfo

func RenderStdInfo(r requestWriter, s tracer.ErrorType)

func StacktraceMiddleware

func StacktraceMiddleware(settings *AppSettings) router.Middleware

This is a middleware function that should be used in the router.

It will recover from a panic and render a stacktrace of the error.

You can limit the information that is displayed by setting the tracer.STACKLOGGER_UNSAFE variable to false.

Or when using the default app.Applicationm you can set the app.Application.DEBUG variable to false. (This will disable it! Recommended.)

func StyleBlock

func StyleBlock(b requestWriter)

func SubHeader

func SubHeader(b requestWriter, s string)

Types

type AppSettings

type AppSettings struct {
	DEBUG  bool
	HOST   string
	PORT   int
	ROUTES string

	DATABASES []DatabaseSetting
}

Some application settings that are useful to display in the stacktrace.

type DatabaseSetting

type DatabaseSetting struct {
	ENGINE   string
	NAME     string
	SSL_MODE string
	DB_USER  string // Will be displayed.
	DB_PASS  string // Will not actually be used, but is here for completeness
}

Some database settings that are useful to display in the stacktrace.

The DB_PASS field is not actually used, but is here for completeness.

It will be displayed in the stacktrace as "********".

Jump to

Keyboard shortcuts

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