Service: console

console

The console service facilitates the writing of logging messages to the CompleteFTP server log. It's used by invoking methods of the global console object as follows:

console.log("Hello world");

Log messages are recorded in the Diagnostics.log file and may also be viewed by opening the real-time logging window or panel in CompleteFTP Manager.

Methods

(static) debug(message)

Write the given message to the server log (debug-level).

Parameters:
Name Type Description
message String

Message to log.

(static) dump(object, labelopt)

Writes a JSON representation of the given object with the given name to the server log (info-level).

Note that this is functionally equivalent to

console.log(label + " = " + JSON.stringify(object));
Parameters:
Name Type Attributes Description
object Object

Object to be logged

label String <optional>

Label to show in the log

(static) error(message)

Write the given message to the server log (error-level).

Parameters:
Name Type Description
message String

Message to log.

(static) info(message)

Write the given message to the server log (information-level).

Parameters:
Name Type Description
message String

Message to log.

(static) log(message)

Write the given message to the server log (information-level).

Parameters:
Name Type Description
message String

Message to log.

(static) warn(message)

Write the given message to the server log (warning-level).

Parameters:
Name Type Description
message String

Message to log.