Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DEBUG = false
DEBUG is used to flag if the server errors are to respond with debug messages when handling http. Should be false when running during production
View Source
var LogPath = ""
LogPath is the directory to store all logs. This should be set externally
Functions ¶
func LogString ¶
LogString Returns a tab-indented human readable message containing information about the given error, request, and response
func WriteToFile ¶
WriteToFile writes the given message to the log directory specified by LogPath. The directory will have the structure of LogPath/YYYY/MM/DD.log
Types ¶
type Error ¶
type Error interface { error // normally only sends the first string in the messsages. In debug // mode sends the full Error message http.Handler Unwrap() error // creates new error with addition messages Extend(msgs ...string) Error Status() int }
Error type that can also be used to handle http requests
Click to show internal directories.
Click to hide internal directories.