Logging

(in ./Carbon/Logging.lua)

Provides logging facilities.


Methods

class public Logging.Message(string msg)

Returns

  • required msg: The message to send.

Reports a message to the log.


class public Logging.MessageOnce(string msg)

Returns

  • required msg: The message to send.

Reports a message to the log, once per message body.


class public Logging.Notice(string msg)

Returns

  • required msg: The notice to send.

Reports a notice to the log if ReportingLevel >= 2.


class public Logging.NoticeOnce(string msg)

Returns

  • required msg: The notice to send.

Reports a notice to the log if ReportingLevel >= 2, once per message body.


class public Logging.SetOutputHandle(file handle)

Returns

  • required handle: The file handle to use for logging.t

Sets a new handle for outputting logs with.


class public Logging.Warn(string msg)

Returns

  • required msg: The warning to send.

Reports a warning to the log if ReportingLevel >= 1.


class public Logging.Warn(string msg)

Returns

  • required msg: The error to send.

Reports an error to the log and throws an error.


class public Logging.WarnOnce(string msg)

Returns

  • required msg: The warning to send.

Reports a warning to the log if ReportingLevel >= 1, once per message body.


Properties

public unumber ReportingLevel

The level of messages to report. Messages are always outputted.

  • 0 - Errors only
  • 1 - Errors and warnings
  • 2 - Errors, warnings, and notices