Dev

server.DevConfig Dev controls and the log categories issued by gox-server.

gox
Dev: server.DevConfig{
    Enabled: true,
    Logs: server.DevLogsConfig{
        Static:    false,
        GoxFile:   true,
        Trace:     false,
        TraceDeep: false,
    },
},

Structure

text
DevConfig
{
    Enabled bool
    Logs server.DevLogsConfig
}

DevLogsConfig
{
    Static bool
    GoxFile bool
    Trace bool
    TraceDeep bool
}
FieldDescription
EnabledIt indicates if Dev is enabled.
StaticIt records requests for static files.
GoxFileRecord file compilation and execution .gox.
TraceIt records the main stages of the pipeline of an request.
TraceDeepAdd 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 TraceDeep for point analysis.
  • Disable Dev logging in production.

See also

Next step

Continue with HTTP to configure the list and the processing of requests.

HTTP