Logs

Using GoZync's Logs

The logs in GoZync are completely customizable and can be a great help in finding your way through GoZync's scripts. Here are some tips for making the most out of them. See "Customizing Logs" below.

There is a Zync Logs tab in both GoZyncMobile and GoZyncHosted. The difference is that GoZyncHosted shows the most recent log for each synced device; GoZyncMobile only show that device's log.

The contents of the mobile and hosted logs will be the same if the sync was allowed to finish with the connection to the host still open. If the connection to the host breaks before the sync is complete you'll see a partial log in GoZyncHosted and the complete log will be in GoZyncMobile.

Errors are shown in orange. Learn more about common error codes here:  Error Codes.

Here is a short video on how to use the logs in conjunction with the (amazing) 2empower developer assistant to really get inside GoZync:

Log History

GoZync only saves the latest sync log for each device. Those logs are written by FileMaker scripts, though, so you could alter the script to save copies in a new related table of your own design. The finished log is processed in the script "Save Log To Disk" in GoZyncMobile and the hosted files are still open at that point, in case you wanted to set the log contents to a new record in a hosted table.

Customizing Logs

The log is completely customizable, and some of what you want is already there. Here is a log from a multi-table zync where we ran the script "Zync It - This File" (that runs the default sync action for each table). You'll see the tables passed it at the top of the log and then as each table begins you'll see it's name again in the log along with its default action like this: "Running default action for <table occurrence name>: <action>"

1/7/2013 7:48:49 PM - Started<br>-------------------------<br> Split     Total<br>0:00:00 - 0:00:00 - Public API Started: Clients<br>Fittings<br>FittingsBike<br>FittingsSnow<br>FootbedModels<br>Images<br>Messages<br>Models<br>Settings<br>Staff<br>Templates<br>Tryons File<br>0:00:00 - 0:00:00 - Connecting to server...<br>0:00:01 - 0:00:01 - Getting settings from Host...<br>0:00:00 - 0:00:01 - Running default action for Clients : Round Trip<br>0:00:00 - 0:00:01 - Assembling the package: Clients<br>0:00:00 - 0:00:01 - Preparing & sending 0 records: Clients<br>0:00:00 - 0:00:01 - Completed 0 records: Clients<br>0:00:00 - 0:00:01 - Processing this device's Inbox on the Host<br>0:00:01 - 0:00:02 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:02 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:02 - Processing 1 of 1 packages recd. (3 records)<br>0:00:01 - 0:00:03 - Looking for records to delete<br>0:00:00 - 0:00:03 - Record deletion completed<br>0:00:00 - 0:00:03 - Processing completed<br>0:00:00 - 0:00:03 - Running default action for Fittings : Round Trip<br>0:00:00 - 0:00:03 - Assembling the package: Fittings<br>0:00:00 - 0:00:03 - Preparing & sending 0 records: Fittings<br>0:00:00 - 0:00:03 - Completed 0 records: Fittings<br>0:00:00 - 0:00:03 - Processing this device's Inbox on the Host<br>0:00:02 - 0:00:05 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:05 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:05 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:05 - Looking for records to delete<br>0:00:00 - 0:00:05 - Record deletion completed<br>0:00:00 - 0:00:05 - Processing completed<br>0:00:00 - 0:00:05 - Running default action for FittingsBike : Round Trip<br>0:00:00 - 0:00:05 - Assembling the package: FittingsBike<br>0:00:00 - 0:00:05 - Preparing & sending 0 records: FittingsBike<br>0:00:00 - 0:00:05 - Completed 0 records: FittingsBike<br>0:00:00 - 0:00:05 - Processing this device's Inbox on the Host<br>0:00:02 - 0:00:07 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:07 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:07 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:07 - Looking for records to delete<br>0:00:00 - 0:00:07 - Record deletion completed<br>0:00:00 - 0:00:07 - Processing completed<br>0:00:01 - 0:00:08 - Running default action for FittingsSnow : Round Trip<br>0:00:00 - 0:00:08 - Assembling the package: FittingsSnow<br>0:00:00 - 0:00:08 - Preparing & sending 0 records: FittingsSnow<br>0:00:00 - 0:00:08 - Completed 0 records: FittingsSnow<br>0:00:00 - 0:00:08 - Processing this device's Inbox on the Host<br>0:00:02 - 0:00:10 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:10 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:10 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:10 - Looking for records to delete<br>0:00:00 - 0:00:10 - Record deletion completed<br>0:00:00 - 0:00:10 - Processing completed<br>0:00:00 - 0:00:10 - Running default action for FootbedModels : Round Trip<br>0:00:00 - 0:00:10 - Assembling the package: FootbedModels<br>0:00:00 - 0:00:10 - Preparing & sending 0 records: FootbedModels<br>0:00:00 - 0:00:10 - Completed 0 records: FootbedModels<br>0:00:00 - 0:00:10 - Processing this device's Inbox on the Host<br>0:00:02 - 0:00:12 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:12 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:12 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:12 - Looking for records to delete<br>0:00:00 - 0:00:12 - Record deletion completed<br>0:00:00 - 0:00:12 - Processing completed<br>0:00:01 - 0:00:13 - Running default action for Images : Round Trip<br>0:00:00 - 0:00:13 - Assembling the package: Images<br>0:00:00 - 0:00:13 - Preparing & sending 0 records: Images<br>0:00:00 - 0:00:13 - Completed 0 records: Images<br>0:00:00 - 0:00:13 - Processing this device's Inbox on the Host<br>0:00:02 - 0:00:15 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:15 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:15 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:15 - Looking for records to delete<br>0:00:00 - 0:00:15 - Record deletion completed<br>0:00:00 - 0:00:15 - Processing completed<br>0:00:00 - 0:00:15 - Running default action for Messages : Round Trip<br>0:00:00 - 0:00:15 - Assembling the package: Messages<br>0:00:00 - 0:00:15 - Preparing & sending 0 records: Messages<br>0:00:00 - 0:00:15 - Completed 0 records: Messages<br>0:00:00 - 0:00:15 - Processing this device's Inbox on the Host<br>0:00:03 - 0:00:18 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:18 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:18 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:18 - Looking for records to delete<br>0:00:00 - 0:00:18 - Record deletion completed<br>0:00:00 - 0:00:18 - Processing completed<br>0:00:00 - 0:00:18 - Running default action for Models : Round Trip<br>0:00:00 - 0:00:18 - Assembling the package: Models<br>0:00:00 - 0:00:18 - Preparing & sending 0 records: Models<br>0:00:01 - 0:00:19 - Completed 0 records: Models<br>0:00:00 - 0:00:19 - Processing this device's Inbox on the Host<br>0:00:03 - 0:00:22 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:22 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:22 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:22 - Looking for records to delete<br>0:00:00 - 0:00:22 - Record deletion completed<br>0:00:00 - 0:00:22 - Processing completed<br>0:00:01 - 0:00:23 - Running default action for Settings : Round Trip<br>0:00:00 - 0:00:23 - Assembling the package: Settings<br>0:00:00 - 0:00:23 - Preparing & sending 0 records: Settings<br>0:00:00 - 0:00:23 - Completed 0 records: Settings<br>0:00:00 - 0:00:23 - Processing this device's Inbox on the Host<br>0:00:03 - 0:00:26 - Asking the host for changed records: pulling down.<br>0:00:01 - 0:00:27 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:27 - Processing 1 of 1 packages recd. (1 records)<br>0:00:00 - 0:00:27 - Looking for records to delete<br>0:00:00 - 0:00:27 - Record deletion completed<br>0:00:00 - 0:00:27 - Processing completed<br>0:00:00 - 0:00:27 - Running default action for Staff : Round Trip<br>0:00:00 - 0:00:27 - Assembling the package: Staff<br>0:00:00 - 0:00:27 - Preparing & sending 0 records: Staff<br>0:00:00 - 0:00:27 - Completed 0 records: Staff<br>0:00:00 - 0:00:27 - Processing this device's Inbox on the Host<br>0:00:05 - 0:00:32 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:32 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:32 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:32 - Looking for records to delete<br>0:00:00 - 0:00:32 - Record deletion completed<br>0:00:00 - 0:00:32 - Processing completed<br>0:00:00 - 0:00:32 - Running default action for Templates : Round Trip<br>0:00:00 - 0:00:32 - Assembling the package: Templates<br>0:00:00 - 0:00:32 - Preparing & sending 0 records: Templates<br>0:00:00 - 0:00:32 - Completed 0 records: Templates<br>0:00:00 - 0:00:32 - Processing this device's Inbox on the Host<br>0:00:05 - 0:00:37 - Asking the host for changed records: pulling down.<br>0:00:01 - 0:00:38 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:38 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:38 - Looking for records to delete<br>0:00:00 - 0:00:38 - Record deletion completed<br>0:00:00 - 0:00:38 - Processing completed<br>0:00:00 - 0:00:38 - Running default action for Tryons : Round Trip<br>0:00:00 - 0:00:38 - Assembling the package: Tryons<br>0:00:00 - 0:00:38 - Preparing & sending 0 records: Tryons<br>0:00:00 - 0:00:38 - Completed 0 records: Tryons<br>0:00:00 - 0:00:38 - Processing this device's Inbox on the Host<br>0:00:07 - 0:00:45 - Asking the host for changed records: pulling down.<br>0:00:00 - 0:00:45 - Retrieving the Outbox from Host<br>0:00:00 - 0:00:45 - Processing 1 of 1 packages recd. (0 records)<br>0:00:00 - 0:00:45 - Looking for records to delete<br>0:00:00 - 0:00:45 - Record deletion completed<br>0:00:00 - 0:00:45 - Processing completed<br>0:00:00 - 0:00:45 - Closing GoZyncMobile<br>0:00:00 - 0:00:45 - Public API Ended: Tryons Round Trip<br>0:08:58 - 0:09:43 - Closing GoZyncMobile
	

You can add whatever else you'd like to the log. Here's how.

In any script, set a variable $NoResult to the custom function "gz_Timer_Split" and pass into the function whatever you'd like to see in the log. For example, this...gz_Timer_Split( "Connecting to server..." )

...adds the phrase "Connecting to server..." to the log and gives it a split time. You can do this in the scripts of both GoZyncMobile and GoZyncHosted.

Not sure which scripts to insert steps into? The log can help there as well: run a sync and then find a phrase in the log you're interested in, like "Looking for records to delete". Then  search the scripts (video below) of GoZyncMobile / Hosted for that phrase and you'll find exactly where that happens in our scripts. (Turns out "Looking for records..." happens in the script "Delete Records Not In The IDs List (IDs)" in GoZyncMobile.)

Search scripts video:


If you run a sync with some breakpoints in that script you can use the data viewer to see what other variables you have access to at that point for possible inclusion in your new log message.