Documentation ¶
Index ¶
- Variables
- func Code(b requestWriter, s string)
- func Error(b requestWriter) *errorBuilder
- func Header(b requestWriter, s string)
- func HorizontalRule(b requestWriter)
- func HorizontalRuleXS(b requestWriter)
- func MedHeader(b requestWriter, s string)
- func Paragraph(b requestWriter, s string)
- func Pre(b requestWriter, s string)
- func RenderRequest(b *request.Request)
- func RenderSettings(b requestWriter, settings *AppSettings)
- func RenderStackTrace(s tracer.ErrorType, r *request.Request)
- func RenderStdInfo(r requestWriter, s tracer.ErrorType)
- func StacktraceMiddleware(settings *AppSettings) router.Middleware
- func StyleBlock(b requestWriter)
- func SubHeader(b requestWriter, s string)
- type AppSettings
- type DatabaseSetting
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 HorizontalRule ¶
func HorizontalRule(b requestWriter)
func HorizontalRuleXS ¶
func HorizontalRuleXS(b requestWriter)
func RenderRequest ¶
func RenderSettings ¶
func RenderSettings(b requestWriter, settings *AppSettings)
func RenderStdInfo ¶
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)
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 "********".
Click to show internal directories.
Click to hide internal directories.