Ticket #674 (closed enhancement: fixed)

Opened 22 months ago

Last modified 20 months ago

default "log" function

Reported by: psd Owned by: JeremyRuston
Priority: trivial Milestone: 2.4.1
Component: core Version:
Severity: undefined Keywords: log logging console
Cc:

Description

authors can't rely upon console.log existing in each browser, so typically endup writing a per-plugin "log" function to detect if the console exists before calling console.log, or displayMessage.

suggest the core provides a dummy log() function with the same arguments as console.log, e.g in main.js:

log = function() {};

Extensions can then include calls to log() without causing problems in IE or doing anything, by default.

A TiddlyWiki author can select which variety of logging they prefer, by including a plugin which redefines log, e.g.:

 http://svn.tiddlywiki.org/Trunk/contributors/PaulDowney/plugins/LogMessagePlugin/

which optionally calls console.log, displayMessage or writes text to a popup window.

Change History

Changed 20 months ago by MartinBudden

  • milestone set to 2.4.1

Changed 20 months ago by MartinBudden

  • status changed from new to closed
  • resolution set to fixed

Fixed in changeset:5890

Changed 20 months ago by FND

Implementation changed in changeset:6168

Note: See TracTickets for help on using tickets.