Back to catalog

Utility Infrastructure

H01 pLogger Unit

Utility infrastructure tests for pLogger. These cases verify explicit .alog capture, wildcard logging with omit patterns, dynamic log requests through PLOGGER_CMD, numeric mail capture, datatype marking and precision, synchronous .slog columns, wildcard exclusion .xlog output, copy-file requests, and fixed file naming.

Stem Mission

Baseline scenario context

The stem mission runs a single shoreside MOOS community with pLogger, uTimerScript, pMissionEval, and pMissionHash. The harness adds focused .alog/.slog/.xlog/copied-file checks because the logged files are the behavior under test.

Examples

Representative runs

Explicit Log Capture

Description: Configures Log=PLOGGER_ALPHA @ 0 nosync and posts PLOGGER_ALPHA=alpha, testing explicit asynchronous logging; passes when the live value is alpha and an .alog contains that variable-value pair.

Wildcard Omit

Description: Enables wildcard logging for *_ME, omits OMIT_ME, and posts KEEP_ME=keep plus OMIT_ME=omit, testing the omit pattern; passes when both posts reach the mission evaluator, the .alog contains KEEP_ME=keep, and it does not contain OMIT_ME=omit.

Case Matrix

All cases

plogger_explicit_log_pass

Configures Log=PLOGGER_ALPHA @ 0 nosync and posts PLOGGER_ALPHA=alpha, testing explicit asynchronous logging; passes when the live value is alpha and an .alog contains that variable-value pair.

plogger_wildcard_omit_pass

Enables wildcard logging for *_ME, omits OMIT_ME, and posts KEEP_ME=keep plus OMIT_ME=omit, testing the omit pattern; passes when both posts reach the mission evaluator, the .alog contains KEEP_ME=keep, and it does not contain OMIT_ME=omit.

plogger_dynamic_log_request_pass

Sends PLOGGER_CMD="LOG_REQUEST=DYN_LOG @ 0 nosync" before posting DYN_LOG=dynamic, testing runtime addition of an asynchronous log variable; passes when the live value is dynamic and an .alog contains that variable-value pair.

plogger_double_log_pass

Explicitly logs numeric post PLOGGER_NUM=42.5, exercising double-valued asynchronous serialization; passes when the live value is between 42 and 43 and an .alog records PLOGGER_NUM with numeric value 42.5.

plogger_sync_log_pass

Enables a 0.5-second synchronous log and configures SYNC_ALPHA as a synchronous column, testing static .slog column creation; passes when SYNC_ALPHA=sync reaches the evaluator and an .slog header contains SYNC_ALPHA.

plogger_wildcard_xlog_pass

Enables wildcard logging for XLOG_*, omits XLOG_OMIT, and enables WildcardExclusionLog, testing exclusion-file routing; passes when both live posts arrive, the .alog contains XLOG_KEEP=keep but not XLOG_OMIT=omit, and an .xlog contains the omitted pair.

plogger_filetimestamp_false_pass

Sets FileTimeStamp=false, File=LOG_plogger_filetimestamp_false_pass, and posts FIXED_NAME=fixed, testing deterministic log naming; passes when that exact directory and .alog filename exist and the file contains the posted pair.

plogger_datatype_precision_pass

Sets MarkDataType=true and DoublePrecision=3, then posts DTYPE_NUM=3.14159265 and DTYPE_STR=typed, testing type markers and numeric rounding; passes when the live values match and an .alog contains D:3.142 and S:typed entries.

plogger_dynamic_sync_column_pass

Enables a 0.5-second synchronous log, sends PLOGGER_CMD="LOG_REQUEST=DYN_SYNC @ 0", and posts DYN_SYNC=dynsync, testing runtime addition of a synchronous column; passes when the live value is dynsync and an .slog header contains DYN_SYNC.

plogger_copy_file_request_pass

Sends PLOGGER_CMD="COPY_FILE_REQUEST=logger_copy_source.txt", testing runtime file copying into the log directory; passes when the live completion flag is true and the generated logger_copy_source._txt contains the source text pLogger copy-file source artifact.

Source links

Harness README Mission README