Configure which log categories will show up in the logging. This helps to:
Set logging category via:
| Way | Description |
|---|---|
| Query Parms | For any page using TOP |
| Log API | Requires set up on the page |
toplogcat sets which log categories will show up in the console.
Multiple categories can be set by delimiting with a pipe character:
Log.updateCategories sets which log categories will show up in the console.
var Log = TOP.logging.Log;
Log.updateCategories({
ads : true,
config : true
});Check out Log.data to see what log categories are available / enabled:
TOP.logging.Log.data().categorieswill show something like the following:
{
ads : false
ads.consumer : false
ads.provider : false
analytics : false
api : false
api.commands : false
api.events : false
captions : false
cms : false
config : false
core.controller.events.ads : false
core.controller.events.media: false
core.notifications : false
cues : false
fragment : false
lib.tasks : false
lib.timeline : false
manifest : false
media : false
mediaEngine : false
mediaMetadata : false
persistence : false
transaction : false
ui : false
ui.ads : false
ui.api : false
ui.cc : false
ui.config : false
ui.media : false
ui.menus : false
ui.slates : false
}Sub-categories are defined by naming after a period:
{category}.{sub-category}For example, api has some sub-categories:
commandseventsSpecifying api.events as a category will only show logs relevant to api events.
But specifying the main category (api in this case) will show logs for all sub-categories under the main category. So api, api.commands, and api.events will show up in the logs.