Log file

wfview writes a log file, which can be useful to look at when things don’t work. When you witness unexpected program behavior, click the Log button. This is like your gauges in a car — look here first when there is trouble. When you post to our support forum, it’ll save everyone a step if you check the log first. If you see anything interesting, use the “send to termbin” function and paste a link to the log into your support forum post. It helps a lot!

Since wfview version 1.5, the program has a button, “Log” in the bottom row.

wfview log button

Press this button to open the log window, which will display the log and allows for several useful actions:

wfview logging window

Here is what each button does:

  • Annotation: Type any text that you would like to enter into the program’s log file. This is useful to take notes. You might want to take notes about malfunctions you experience, or note what you are trying to do just before an action takes place.
  • Debug: Checking here enables more verbose logging
  • Scroll Down: Scrolls the contents of the window down, useful if you have scrolled up and just want to jump to the bottom
  • Clear: Clears the display. Does not clear the contents of the log file.
  • Open Log Directory: Opens the directory where the log is stored.
  • Open Log: Opens the log file in your operating system’s text editor.
  • Copy Path: Copies the path of the log file to the clip board
  • Send to termbin.com: Sends the displayed log entries to termbin.com, and provides you with a URL from which you can then access and share the log file.

About Send to termbin.com: When you press this button, the log (as displayed) will be sent to termbin.com. This is the same website used by many linux commands to help people share debugging information. Keep in mind that the log file may contain information such as your user name and ip address. When you are looking for help with wfview, if you press this button, a URL will be copied to the clipboard automatically, which you can then paste into a post on our support forum. This is by far the easiest way to share a log file.

Default Log File Location

Remember, you can copy the log file path using the “Copy Path” button in wfview.

  • Linux: /tmp
  • Windows: %TEMP%/wfview
  • macOS: /private/$TMPDIR/org.wfview.wfview (use the “Copy Path” button in wfview’s log GUI to obtain the path quickly)

The log file name is, by default, in for form of “wfview-yyyymmddhhmmss.log“. The time stamp refers to the moment the program was started. You can override this behavior by specifying the --logfile argument when you start wfview, for example:

wfview --logfile /tmp/IC-7300.log

would cause the log file to be named “/tmp/IC-7300.log”. Paths are relative to the current working directory if an absolute path isn’t given.

Debug Logging

To aid in debugging, wfview may be started with a debugging flag, which causes much more data to be logged to the log file. To start wfview with debug logging, run wfview with either a -d flag or --debug. For example:

wfview --debug

Once done, the log file will contain a much greater amount of information. For macOS, run the following terminal commands:

cd /Applications
open wfview.app --args --debug

Note that you can turn on debug logging from within wfview, by checking the “Debug” checkbox in the Log window. However, starting wfview with debug logging will generate some more messages concerning the startup sequence.

Logging Features

When wfview starts, it will begin with “INF system: Starting wfview”. Each line has the current date, time, logging category, and subsystem label. Logging categories include:

  • INF (informative)
  • DBG (debug)
  • WRN (warning)

Subsystems (logical units of code basically) include:

  • system (wfmain.cpp)
  • audio (audio handler)
  • audioconverter (sample rate conversion, channel count, bit depth, etc)
  • udpaudio (network audio)
  • udp (communication to and from a radio over network)
  • rig (rigCommander)
  • serial (pseudo-term and serial-connected rigs)
  • gui (gui-specific parts of wfmain.cpp)
  • user (user annotations)

Useful Log Messages:

Briefly, here are some useful things to look for:

Rig-ID: This is how the radio is identified:

2021-05-15 16:38:41.230 DBG rig: ---Rig FOUND from broadcast query:
2021-05-15 16:38:41.230 INF rig: Using incomingCIVAddr: (int): 148 hex: 94
2021-05-15 16:38:41.230 INF rig: Have rig ID: decimal: 148
2021-05-15 16:38:41.230 DBG system: Rig name: "IC-7300"
2021-05-15 16:38:41.230 DBG system: Has LAN capabilities: false
2021-05-15 16:38:41.230 DBG system: Rig ID received into wfmain: spectLenMax: 475
2021-05-15 16:38:41.230 DBG system: Rig ID received into wfmain: spectAmpMax: 160
2021-05-15 16:38:41.230 DBG system: Rig ID received into wfmain: spectSeqMax: 11
2021-05-15 16:38:41.230 DBG system: Rig ID received into wfmain: hasSpectrum: true

In the above case, the rig was identified by means of a broadcast request (to CI-V address 0x00).

With debug logging enabled, the following additional data are available:

Traffic to the radio: wfview logs data to the radio, except for regularly polled queries (such as the s-meter). The format is as follows:

2021-05-15 16:38:41.267 DBG rig: Final payload in rig commander to be sent to rig:
2021-05-15 16:38:41.267 DBG rig: ---- Begin hex dump -----:
2021-05-15 16:38:41.267 DBG rig: "INDEX: 00 01 02 03 04 05 "
2021-05-15 16:38:41.267 DBG rig: "DATA:  fe fe 94 e1 03 fd "
2021-05-15 16:38:41.267 DBG rig: ----- End hex dump -----

Here, we are requesting the current frequency (command 0x03) from the radio at address 0x94.

Traffic from radio: wfview logs any data received from the radio, except for spectrum and metering data, since these requests happen so frequently that logging them takes a lot of resources. The format is as follows:

2021-05-15 16:38:41.270 DBG rig: ---- Begin hex dump -----:
2021-05-15 16:38:41.271 DBG rig: "INDEX: 00 01 02 03 04 05 06 "
2021-05-15 16:38:41.271 DBG rig: "DATA:  03 00 20 28 07 00 fd "
2021-05-15 16:38:41.271 DBG rig: ----- End hex dump -----

You can see that the CI-V preamble and to/from address portion is already stripped out. In this case, the rig is responding to a frequency query request (command 0x03). The indicated frequency is 7.282000 MHz.