RapidContext
Access > Discovery > Insight
www.rapidcontext.com
Provides a logging service for debugging apps and server calls.
All log messages are filtered by log level and either discarded or
stored to an internal array. This makes it possible to either show these
in a developer console or to send them to a server for remote storage.
This module also replaces the built-in console.error(), console.warn(),
console.info() and console.log() functions with its own versions,
passing through the filtered log messages to the original functions. For
browsers without a console object, a minimal version is provided.
Source code:
RapidContext_Log.js
<static> |
RapidContext.Log.clear()
Clears the log console and the array of stored messages.
|
<static> |
RapidContext.Log.context(value)
Returns and optionally sets the current log context.
|
<static> |
RapidContext.Log.debug(msg)
Logs a debug message with optional data.
|
<static> |
RapidContext.Log.error(msg)
Logs an error message with optional data.
|
<static> |
RapidContext.Log.history()
Returns the history of filtered log entries.
|
<static> |
RapidContext.Log.info(msg)
Logs an information message with optional data.
|
<static> |
RapidContext.Log.level(value)
Returns and optionally sets the current log level.
|
<static> |
RapidContext.Log.logBrowserInfo()
Logs a number of browser meta-data parameters (INFO level).
|
<static> |
RapidContext.Log.stringify(o)
Creates a string representation (suitable for logging) for any value or
object.
|
<static> |
RapidContext.Log.warn(msg)
Logs a warning message with optional data.
|
none,
error,
warn,
info,
logand
all.
RapidContext.Log.context('mybutton.onclick'); ... console.warn('unsupported xyz value:', value); ... RapidContext.Log.context(null);
console.error('failed to initialize module');
console.warn('missing "data" attribute on document root:', document.body);
console.info('authorization failed, user not logged in');
console.log('init AJAX call to URL:', url); ... console.log('done AJAX call to URL:', url, responseCode);