com.dss.logging

1.0.2 • Public • Published

Logging

How To Install

The logging package uses the scoped registry feature to import dependent packages. Please add the following sections to the package manifest file (Packages/manifest.json).

To the scopedRegistries section:

{
    "name": "DSS",
    "url": "https://registry.npmjs.com",
    "scopes": [ "com.dss" ]
}

To the dependencies section:

"com.unity.textmeshpro": "3.0.6",
"com.dss.core-utils": "1.6.4",
"com.dss.logging": "1.0.1"

After changes, the manifest file should look like below:

{
    "scopedRegistries": [
    {
        "name": "DSS",
        "url": "https://registry.npmjs.com",
        "scopes": [ "com.dss" ]
    }
    ],
    "dependencies": {
        "com.unity.textmeshpro": "3.0.6",
        "com.dss.core-utils": "1.6.4",
        "com.dss.logging": "1.0.1"
        ...

Usage

Drag the Logger prefab into the scene, and then call it from scripts like so:

// Reference the instance and make sure its enabled, so the messages appear on the screen
DSS.Logging.Logger logger = DSS.Logging.Logger.Instance;
logger.enabled = true;

// Then log like normal
logger.Log("This is a message");
logger.LogWarning("Look out!");
logger.LogError("Uh oh....");

/com.dss.logging/

    Package Sidebar

    Install

    npm i com.dss.logging

    Weekly Downloads

    1

    Version

    1.0.2

    License

    BSD-3-Clause

    Unpacked Size

    29.9 kB

    Total Files

    28

    Last publish

    Collaborators

    • danielshervheim