Class: shaka.log

A console logging framework which is compiled out for deployment. This is only available when using the uncompiled version.

Constructor

new log()

A console logging framework which is compiled out for deployment. This is only available when using the uncompiled version.

Source:

Members

currentLevel :number

Type:
  • number
Source:

Level :number

Log levels.
Type:
  • number
Properties:
Name Value Type Description
NONE 0 number
ERROR 1 number
WARNING 2 number
INFO 3 number
DEBUG 4 number
V1 5 number
V2 6 number
Source:

logMap_ :Object.<shaka.log.Level, function(...*)>

Type:
Source:

MAX_LOG_LEVEL :number

the maximum log level.
Type:
  • number
Source:

oneTimeWarningIssued_ :Set.<string>

A Set to indicate which one-time warnings have been issued.
Type:
  • Set.<string>
Source:

Methods

alwaysError(…args)

This always logs to the console, even in Release mode. This should only be used for deprecation messages and things the app should never ignore.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

alwaysWarn(…args)

This always logs to the console, even in Release mode. This should only be used for deprecation messages and things the app should never ignore.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

debug(…args)

This log is to aid *users* in debugging their content. This should be for logs about the content and what we do with it. For example, when we change streams or what we are choosing.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

error(…args)

This log is for when an error occurs. This should always be accompanied with an error event, thrown exception, or rejected Promise. Logs are disabled in Release mode, so there should be other methods of detecting the error.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

info(…args)

This log is for messages to the user about what is happening. For example, when we update a manifest or install a polyfill.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

setLevel(level)

Change the log level. Useful for debugging in uncompiled mode.
Parameters:
Name Type Description
level number
Source:

v1(…args)

This log is for debugging Shaka Player itself. This may be logs about internal states or events. This may also be for more verbose logs about content, such as for segment appends.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

v2(…args)

This log is for tracing and debugging Shaka Player. These logs will happen a lot, for example, logging every segment append or every update check. These are mostly used for tracking which calls happen through the code.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

warning(…args)

This log is for possible errors or things that may be surprising to a user. For example, if we work around unusual or bad content, we should warn that they should fix their content. Deprecation messages and messages the app shouldn't ignore should use alwaysWarn instead.
Parameters:
Name Type Attributes Description
args * <repeatable>
Source:

warnOnce(id, …args)

This always logs to the console, even in Release mode. This should only be used for deprecation messages and things the app should never ignore.
Parameters:
Name Type Attributes Description
id string
args * <repeatable>
Source: