Gets the current key being used to store log entries.
Gets the prefix used for the keys.
Gets the delimiter used to separate each individual log entry within each date-specific value.
Gets the maximum number of days for which log entries will be held.
Protected
appendProtected
renderProtected
render
Class providing support for logging to localStorage
Log entries for each day are concatenated into a single value, separated by the logEntryDelimiter, and stored under a key comprising of the keyPrefix and the numeric timestamp of the date.
Note however that the key format may change, so should you need to access the logs programmatically, it is recommended that the currentKey property is used to identify the current day's logs. To access other days' logs, check for
localStorage
values whose key starts with keyPrefix.maxDays controls the maximum number of days for which log entries are retained. Once this is reached, the oldest day's logs will be deleted.