Debugging

Enable debugging of micro or go-micro very simply via the following environment variables.

Logging

To enable debug logging

  1. MICRO_LOG_LEVEL=debug

The log levels supported are

  1. trace
  2. debug
  3. error
  4. info

To view logs from a service

  1. micro log [service]

Profiling

To enable profiling via pprof

  1. MICRO_DEBUG_PROFILE=http

This will start a http server on :6060

Stats

To view the current runtime stats

  1. micro stats [service]

Health

To see if a service is running and responding to RPC queries

  1. micro health [service]