Partager via


WinJS.Namespace.log function

Writes output to the JavaScript console in Microsoft Visual Studio. You can provide an implementation of this method yourself, or use WinJS.Utilities.startLog to log to the JavaScript console.

Syntax

WinJS.Namespace.log(message, tags, type);

Parameters

  • message
    Type: String

    The message to log.

  • tags
    Type: String

    The tag or tags to categorize the message (winjs, winjs controls, etc.).

  • type
    Type: String

    The type of message (error, warning, info, etc.).

Return value

This function does not return a value.

Remarks

The WinJS.log function is left for you to implement for performance purposes. The following code shows how to start logging and write to the log.

WinJS.Utilities.startLog({type: "customType", tags: "custom" });

WinJS.log && WinJS.log("starting up", "custom", "customType");

Requirements

Minimum WinJS version

WinJS 1.0

Namespace

WinJS.Namespace