Dev
server.DevConfig Dev controls and the log categories issued by gox-server.
Dev: server.DevConfig{
Enabled: true,
Logs: server.DevLogsConfig{
Static: false,
GoxFile: true,
Trace: false,
TraceDeep: false,
},
}, Structure
DevConfig
{
Enabled bool
Logs server.DevLogsConfig
}
DevLogsConfig
{
Static bool
GoxFile bool
Trace bool
TraceDeep bool
} | Field | Description |
|---|---|
Enabled | It indicates if Dev is enabled. |
Static | It records requests for static files. |
GoxFile | Record file compilation and execution .gox. |
Trace | It records the main stages of the pipeline of an request. |
TraceDeep | Add more detailed internal measurements to the track. |
All fields use false as zero value. When Enabled is true, GOX delivers all the responses with the cache defeated, including Pages, Actions, errors, static files and customer assets. TraceDeep is only useful together with Trace and produces considerably more detailed information.
Reloading
Dev and its log categories are replaced during hot relay and used in post-change operations. No need to restart the instance. If the server was started with gox run -dev, the override of Enabled remains active after each recharge.
The automatic recharge remains active regardless of Dev.Enabled; this option controls Dev and its logs, does not activate or disable the watcher.
Static complements the configuration of HTTP showing public file requests. The root structure where it is assigned Dev is documented in Configuration.
Best practices
- It only activates the categories needed to investigate a problem.
- Reserve
TraceDeepfor point analysis. - Disable Dev logging in production.