Logging

…to the console

Harmless message

You will see the following message in the console:

  • Synchronous XMLHttpRequest on the main thread is deprecated…

Don’t worry, this message is harmless and thrown by jQuery internally.

Simple logging

Log
You can seed your own logging messages in your unminified code to the console like this:

$.log("My message");

In order to enable simple logging, set verbosity higher than 0…

Second parameter

$.log() takes a second parameter for dynamically changing verbosity, e.g.

$.log("My message", 2);

…sets verbosity to 2 dynamically.

Advanced logging

There is a built-in and very powerful debugging feature that Ajaxify uses:

In order to enable advanced logging, set verbosity to a high value, like 10…

AND EITHER

manually search for

  • logging=!1

in your Ajaxify file and set to

  • logging=1

OR

Hotlink to this file:

<script src="http://4nf.org/ajaxify_log.js" type="text/javascript"></script>

Once enabled, you should be able to see chronological log of what code has been executed in the console

Fields shown

  • Depth
  • Function name
  • Parameter names
  • Parameter values passed

Demo

Demo site

Copyright 2005-2017, 4nf.org. All rights reserved.
Latest update: 15. January 2017