Logging
Summary
- Logging can be used by Support Teams to debug AdapTable
- Four message channels (
error,warn,success,info) plus aperfchannel are opt-in vialocalStorage.debug - Critical errors still go to the console without a flag
- On a ticket with a coding agent, the adaptable-debug Skill also reads DevTools logs — see Supporting AdapTable
AdapTable writes console messages as the application runs.
Four message channels can be turned on as needed:
errorwarnsuccessinfo
A fifth channel, perf, logs performance metrics for timed operations (see Profiling).
Caution
These channels are silent until you set localStorage.debug as shown below
Note
AdapTable always logs critical messages which need to be seen — these require no developer action to be visible
Making Messages Visible
To make logging visible you need to add a new local storage key-value pair.
Find Out More
This guide by Chrome provides instructions on how to create local storage key-value pairs
To log all messages you need to do:
// hint: this may be a bit too noisy!
localStorage.debug = '*'or alternatively, to log all message types for all AdapTable instances:
localStorage.debug = 'Adaptable:*'Setting Message Types
If you want a more granular approach, you can filter by message type or by AdapTable instance (or both) using the following pattern:
Adaptable:<adaptableId>:<message_type><adaptableId>is the id of the AdapTable instance you want to log for (which was set during initialisation)<message_type>is the type of message you want to log, can be one of:error: error messageswarn: warning messagessuccess: success messagesinfo: info messagesperf: performance metrics
Examples:
// log all messages for a specific AdapTable instance
localStorage.debug = 'Adaptable:<adaptableId>:*'// log only error messages for all AdapTable instances
localStorage.debug = 'Adaptable:*:error'// log only warn messages for a specific AdapTable instance
localStorage.debug = 'Adaptable:<adaptableId>:warn'Caution
Message types are not additive; to see multiple message types, specify them all and separate by using a comma
// log error and warn messages for a specific AdapTable instance
localStorage.debug = 'Adaptable:<adaptableId>:error,Adaptable:<adaptableId>:warn'// log error and perf messages for all AdapTable instances
localStorage.debug = 'Adaptable:*:error,Adaptable:*:perf'Layout Logging
AdapTable offers additional logging assistance for Layouts as they are so intrinsic to how the tool works.
This can be enabled by setting:
localStorage.debug = 'LayoutManager:*'This will log all changes related to a Layout: e.g. column visibility, sorting, row grouping, column resizing, pivoting, aggregations, pinning, switching the layout etc.
Performance Logging
Logging can be used to log performance metrics for certain operations.
Find Out More
See the Guide to Profiling for detailed information
DevTools Grid Info logs
The AdapTable DevTools Grid Info → Logs tab shows AdapTable and Layout Manager messages already collected for the selected adaptableId — filter, sort, and clear without opening the console.
Find Out More
Handbook — DevTools — Grid Info. Same data in scripts — DevTools In-page API getLogs().