Skip to content

Log


You will learn:

  • Structure of Hakutest log
  • How to view Hakutest log

Overview

Hakutest logs events such as HTTP requests, errors that occur, etc. in JSON-like format. You can view the Hakutest log for troubleshooting and debugging purposes.

Log file

Log is stored in hakutest.log file. Its location depends on the operating system you are using:

Linux

The log file is in $XDG_CACHE_HOME/hakutest.

This path defaults to $HOME/.cache/hakutest if $XDG_CACHE_HOME is not set as defined in the XDG Base Directory Specification.

Windows

The log file is in one of the following paths:

  • %AppData%/cache/hakutest
  • %LocalAppData%/cache/hakutest

Log format

Each line (entry) of the log file is a JSON object. It contains the following information:

FieldDescriptionNote
levelLevel of the log entryOne of debug, info, warn, error, fatal, or panic
timeUNIX timestamp of the log entry
messageAny additional information logged by Hakutest
errorAdditional information about the occurred error
methodHTTP method of the incoming requestOnly present in HTTP log entries
pathHTTP path of the incoming requestOnly present in HTTP log entries
statusHTTP status of Hakutest responseOnly present in HTTP log entries
latencyLatency of HTTP request (ms)Only present in HTTP log entries

IMPORTANT

While log entries are valid JSON object, the entire log file itself is not. That means that Hakutest log should be parsed line by line.

Debug

By default Hakutest won't log debug information. You can configure Hakutest to include these messages in log.

Hakutest is released under the MIT License.