logger.q

logging to disk/table/console a logger based on java's, including handlers,filters,formatters. But note there is only one global logger.
handlers - are notified when a logging event occurs
formatters - convert a logrecord into a string
filters - restrict what messages are actually logged

example uses
.logger.addHandler[.logger.getConsoleHandler[ .logger.getLevelFilter[`INFO]; .logger.getSimpleFormatter[] ] ] .logger.addHandler[.logger.getFileHandler[ .logger.getLevelFilter[`WARNING]; .logger.getXMLFormatter[]; `:a.xml ] ] .logger.addHandler[.logger.getTableHandler[ .logger.getLevelFilter[`INFO]; `bob ] ] .logger.info["myClass";"err txt message"]
  • author - Ryan Hamilton

Entity Summary

EntitiesShort Description
.logger.addHandleradds a handler to the list of log handlers notified
.logger.calcPiExample of calculating pi just to demonstrate full range of
.logger.config
.logger.f
.logger.fine
.logger.finer
.logger.finest
.logger.frmtchange any arg passed in, into a string
.logger.getConsoleHandlerA simple handler for writing formatted records to Console
.logger.getFileHandlerA handler that writes formatted log records to a single file
.logger.getLevelFilterFilters logRecords by only permitting ones at the filterLeve
.logger.getSimpleFormatterWrites brief "human-readable" summaries of log records.
.logger.getTableHandlerA handler that writes log records to a single table
.logger.getXMLFormatterWrites detailed XML-structured information.
.logger.handlers
.logger.info
.logger.levels
.logger.logTables
.logger.loqlog an actual message, notice its spelt with a Q, loQ, apply
.logger.offstop logging remote calls
.logger.onTurn on logging.
.logger.operationsTable where each row represents one remote call.
.logger.severeHandy Functions to make calling easier
.logger.warning

Entity Details

.logger.calcPi

Example of calculating pi just to demonstrate full range of qdoc tags etc.

Return: value of PI to n decimal places
Parameters:
  • n - The number of decimal places desired.
compatibility-break:
  • 2011-03-01 - no longer default logs to screen
  • 2011-01-01 - no longer default logs to file
version: 1.0

.logger.loq

log an actual message, notice its spelt with a Q, loQ, apply all handlers to this latest log entry

Examples:
  • .logger.loq[`info;`logger;"Connected"]
  • .logger.loq[`warn;`logger;"could
Parameters:
  • level - - a logger.levels symbol, in order (higher priority first) `SEVERE`WARNING`INFO`CONFIG`FINE`FINER`FINEST
  • message - - the message to log
  • class - - a string describing the class/namespace the logging is occuring in

.logger.operations

Table where each row represents one remote call.

Columns:
  • synch_or_asynch - 1b if message was synchronous else 0b.
  • startTime - The local time at which the call occurred.
s