Skip to content
Johan Degraeve edited this page Apr 18, 2022 · 11 revisions

In the app settings, there is an option to enable NSLog so that all tracing can be found with cfgutil

When enabled, all logging can be viewed on a Mac:

  • install Apple Configurator 2 on a Mac (it's not necessary to run the application)
  • Open a Terminal session (on Mac click Search button top right, type 'Terminal', double click on the Terminal app)
  • change directory to Downloads folder , type :
    cd Downloads
  • to view the logs, there's two options (there's probably more but I use two)
    • to view all logs
      copy paste this :
      /Applications/Apple\ Configurator.app/Contents/MacOS/cfgutil syslog | grep --line-buffered xDrip-NSLog > xdriplog.txt and press enter
    • to view only logs for a specific Category, example here the logs created for Category BluetoothTransmitter and category CGMG5 (all categories are here : https://github.com/JohanDegraeve/xdripswift/blob/master/xdrip/Constants/ConstantsLog.swift)
      copy paste this (the number 4168 is the app build number and may need to bemodified depending on your app version):
      /Applications/Apple\ Configurator.app/Contents/MacOS/cfgutil syslog | grep --line-buffered 'CGMG5\|BlueToothTransmitter' | awk -F "4168 " '{print $2}'

Now use the app, all logging information can be found in the file xdriplog.txt
You can also leave out the redirection to file.

You can now send the file to anyone else who wants to give support.

Or to view the contents in real time while testing

  • open a second terminal session (or the same as the first if you don't need the output in a file)
  • type:
    /Applications/Apple\ Configurator.app/Contents/MacOS/cfgutil syslog | awk '{split($0, a,"xDrip-NSLog ") ; if (length(a) > 1) print a[2] }'