On this page:
start-logging
record
with-recording
log-malt-reset
log-malt-fatal
log-malt-error
log-malt-warning
log-malt-info
log-malt-debug
8.12

20 Logging🔗ℹ

Functions for logging information and reporting moving averages of some types of quantities.

procedure

(start-logging)  void?

Begin log reporting. This function starts a thread with a log-receiver for malt specific logging.

This function must be invoked before any logs are displayed or averaged.

procedure

(record name qty)  tensor?

  name : symbol?
  qty : tensor?
Records qty as another datapoint for name. If name supports it, a moving average of 6 data points will be logged in a message every 20 calls to record.

Currently the only name that supports moving average calculation is 'loss.

procedure

(with-recording loss-fn)  loss-function?

  loss-fn : loss-function?
Returns a loss-function that records the loss produced by loss-fn, using the name 'loss.

procedure

(log-malt-reset)  void?

Resets the logging window for record and with-recording. The average is set to 0.0 and the count of revisions is set to 0.

syntax

(log-malt-fatal string-expr)

(log-malt-fatal format-string-expr v ...)

syntax

(log-malt-error string-expr)

(log-malt-error format-string-expr v ...)

syntax

(log-malt-warning string-expr)

(log-malt-warning format-string-expr v ...)

syntax

(log-malt-info string-expr)

(log-malt-info format-string-expr v ...)

syntax

(log-malt-debug string-expr)

(log-malt-debug format-string-expr v ...)
Log a message at the associated level. Follows conventions of the default Racket logger.