Skip to content

nut.log

Brian edited this page Jun 11, 2015 · 1 revision

This library is used to handle the logging of messages. All logs are saved to the data folder under nutscript/logs on the server and is sorted by date using folders.

Method

  • nut.log.add(message[, flag])
  • Adds a new line to the log for the current date. Flag corresponds to the flag enumerations and determines the color of the log in the console. If the flag is set to FLAG_SERVER, the log is not sent to administrators.
  • nut.log.send(client, message, flag)
  • Shows a log to the specified recipient.

Enumerations

  • FLAG_NORMAL = 0
  • FLAG_SUCCESS = 1
  • FLAG_WARNING = 2
  • FLAG_DANGER = 3
  • FLAG_SERVER = 4
  • FLAG_DEV = 5

Clone this wiki locally