Skip to content

Log

Logger interface for writing log entries to local file system. All calls to Log.info, Log.warn, or Log.error are asynchronous to auto-rotating daily log file. Log file can be viewed via the UI.

All calls to log take a single parameter: a message to write to the log.

Parameters

Parameter name Type Desription
message String a log entry to be written
# get a reference to a symbol we're tracking in the grid
AMC = Positions.get("AMC")

# Now we can test and apply some logic according to the current state of AMC
if AMC.currentPrice < AMC.dayHigh:
  Log.info("Daily low reached?")
// get a reference to a symbol we're tracking in the grid
var AMC = Positions.get("AMC");

// Now we can test and apply some logic according to the current state of AMC
if (AMC.currentPrice < AMC.dayHigh) {
    Log.info("Daily low reached");
}

Log.info

Write an info level log entry.

Log.info("Daily low reached");

Log.warn

Write a warning level log entry.

Log.warn("Daily low reached");

Log.error

Write an error level log entry.

Log.error("Daily low reached");