Moscrif API Docs for: 2012q3
Show:

Log Class

include "lib://core/log.ms";
Library: core

Following functions and variables that "live" in global namespace so they accessible in script without any class designator.

Methods

_log

() private

Loging all passed arguments with severity level

log

(
  • [x]
)

Log into console without any severity level

Parameters:

  • [x] Array optional multiple

    An array of object to be logged into console.

Example:

log(x);
log("x =", x);
log(this);

logE

(
  • [x]
)

Log with severity level Error

Parameters:

  • [x] Array optional multiple

    An array of object to be logged into console.

logI

(
  • [x]
)

Log with severity level Info

Parameters:

  • [x] Array optional multiple

    An array of object to be logged into console.

Example:

logI(x);
logI(true, [1, 2, 3]);

logM

(
  • category
  • [message]
)

Log into monitor.

Parameters:

  • category String

    Category of this log entry.

  • [message] Array optional multiple

    An array of messages to be logged.

Example:

logM("MyCategory", "successfull");

logRE

(
  • ret
  • [x]
)
Object

Log with severity level Error and returning the first argument

Parameters:

  • ret Object

    A value to be returned

  • [x] Array optional multiple

    An array of object to be logged into console.

Returns:

Object: The first argument passed to this function

Example:

function test(a) {
    return logRI(a > 0, a);
}

logRI

(
  • ret
  • [x]
)
Object

Log with severity level Info and returning the first argument

Parameters:

  • ret Object

    A value to be returned

  • [x] Array optional multiple

    An array of object to be logged into console.

Returns:

Object: The first argument passed to this function

Example:

function test(a) {
    return logRI(a > 0, a);
}

logRW

(
  • ret
  • [x]
)
Object

Log with severity level Warning and returning the first argument

Parameters:

  • ret Object

    A value to be returned

  • [x] Array optional multiple

    An array of object to be logged into console.

Returns:

Object: The first argument passed to this function

Example:

function test(a) {
    return logRW(a > 0, a);
}

logW

(
  • [x]
)

Log with severity level Warning

Parameters:

  • [x] Array optional multiple

    An array of object to be logged into console.

Attributes

enableLogging

Boolean

Global switch to enable/disable logging

Default: false

enableLoggingWithStackTrace

Boolean

Global switch to enable/disable logging with detailed stack trace

Default: false