How to configure logging into a file#

You sometimes want to get a log in the filesystem. No matter if qemu or normal, this should work. Though you can set it up at application level only, it can bring significant benefits for offline analysis.

  1. take a look at the following document regarding configuration of logging logging.json

The following config will set App1 to write into /tmp/App1.dlt

{
  "appId": "App1",
  "appDesc": "App1 general description",
  "logfilePath": "/tmp",
  "logLevel": "kWarn",
  "logMode": "kRemote|kFile",
  "contextConfigs": [
  {
    "name": "ctx1",
    "logLevel": "kError"
  },
  {
    "name": "ctx2",
    "logLevel": "kWarn"
  },
  ]
}
  1. Specifically,

  • have a logging.json file. It is very useful at the moment.

  • in your logging.json file append |kFile to your logMode, and as logfilePath use the target directory, e.g. “/tmp”.