Skip to content

Commit

Permalink
Add note re debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Jul 8, 2019
1 parent 9729ddb commit 229e21f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions running.rst
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,23 @@ __ http://citationstyles.org/downloads/specification.html#bibliography-specific-
Dirty Tricks
------------
!!!!!!!!!!!!!
Debug logging
!!!!!!!!!!!!!
Errors and warnings are issued by the functions ``CSL.error`` and ``CSL.debug``
respectively, both of which take a single string as argument. The former
throws an error. The latter reports the string to ``console.log`` if available,
otherwise ``dump`` is used. The functions can be redefined to use any reporting
mechanism you like. For example:
.. code-block:: javascript
CSL.debug = function(str) {
MyApp.log(str);
}
!!!!!!!!!!!!!!!!!!!!!!
Special citation forms
!!!!!!!!!!!!!!!!!!!!!!
Expand Down

0 comments on commit 229e21f

Please sign in to comment.