console

console

Description:
  • 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

MethodReturnsDescription
debug() void

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

dump() void

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

error() void

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

info() void

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

log() void

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

warn() void

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

Method Details

(static) debug(message)

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

Parameters:
Name Type Description
message String

Message to log.

(static) dump(object, labelopt)

Description:
  • 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)

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

Parameters:
Name Type Description
message String

Message to log.

(static) info(message)

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

Parameters:
Name Type Description
message String

Message to log.

(static) log(message)

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

Parameters:
Name Type Description
message String

Message to log.

(static) warn(message)

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

Parameters:
Name Type Description
message String

Message to log.