Ticket #674 (closed enhancement: fixed)
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.
