You can access these logs via `kubectl logs deployment/coder -n <coder-namespace>` on Kubernetes or `journalctl -u coder` if you deployed Coder on a host machine/VM.
- To change the log format/location, you can set [`CODER_LOGGING_HUMAN`](../../reference/cli/server/index.md#--log-human) and [`CODER_LOGGING_JSON`](../../reference/cli/server/index.md#--log-json) server config. options.
- To only display certain types of logs, use the[`CODER_LOG_FILTER`](../../reference/cli/server/index.md#-l---log-filter) server config.
Using `.*` will result in the `DEBUG` log level being used.
> If you set no JSON or Stackdriver log location, Coder then writes no logs.
> Do not use an empty value to disable logging.
> If every log location is empty and [`--trace`](../../reference/cli/server/index.md#--trace) (`CODER_TRACE_ENABLE`) is off, the server exits with `no loggers provided, use /dev/null to disable logging`.
Logs for [external provisioners](../../install/operate/provisioners/index.md) are structured [and configured](../../reference/cli/provisioner/start.md#--log-human) similarly to `coderd` logs.
Use these logs to troubleshoot and monitor the Terraform operations behind workspaces and templates.
The [Coder agent](../../install/plan/architecture.md#agents) inside workspaces provides useful logs around workspace-to-server and client-to-workspace connections.
For Kubernetes workspaces, these are typically the pod logs as the agent runs via the container entrypoint.
- Windows: Refer to the template code (for example, [azure-windows](https://github.com/coder/coder/blob/2cfadad023cb7f4f85710cff0b21ac46bdb5a845/examples/templates/azure-windows/Initialize.ps1.tftpl#L64)) to see where logs are stored.
Sometimes, a workspace might take a while to start or even fail to start due to underlying events on the Kubernetes cluster such as a node being out of resources or a missing image.