Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

FileLogger

 2 Minutes

 0 Likes

 5 Views

FileLogger writes information, warning, and error messages to the PIXERA log and to a buffered .log file. File output is batched to reduce filesystem access while keeping the buffer size and flush interval configurable.


Usage

Use FileLogger when values received through Control node connections should be visible in the PIXERA log and retained in a text log file. The info, warning, and error actions select the corresponding PIXERA log level and add a matching LUA Info, LUA Warning, or LUA Error prefix to the file entry.

The PIXERA log receives the supplied message without an additional action-path prefix. File entries can optionally include a timestamp.


Setup

  1. (Optional) Set Folder Path to a writable directory. The exported default is C:\ProgramData\AV Stumpfl\Pixera\logs.
  2. (Optional) Set File Name without an extension. FileLogger appends .log automatically.
  3. (Optional) Enable or disable Add Timestamp as required.
  4. (Optional) Set Buffer Size to the number of queued messages that triggers a write. The default is 25.
  5. (Optional) Set Flush Interval Seconds to the maximum time queued messages wait before a write is attempted. The default is 1 second.
  6. (Optional) Leave Auto Init enabled for automatic initialization, or run init manually after changing configuration properties.
  7. Connect actions to info, warning, or error. Use writeToFile when a message should only be queued for the file without being sent to the PIXERA log.

The buffer is written when it reaches Buffer Size, when the periodic flush interval elapses, or when uninit runs. If writing fails, queued messages remain available for a later retry. Once the buffer is full, additional messages are not queued until a flush succeeds. A failed final flush during uninit discards the remaining queued messages and reports an error.


Features

  1. Sends information, warning, and error messages to the matching PIXERA log levels.
  2. Writes messages to a configurable .log file using a bounded buffer.
  3. Flushes the buffer by size, elapsed time, and during uninitialization.
  4. Optionally prepends each file entry with a timestamp in YYYY-MM-DD HH:MM:SS format.
  5. Retains queued messages for retry after file-open or write failures during normal operation.
  6. Supports direct file-only messages through writeToFile.
  7. Provides ref for forwarding calls through module references.

Actions

Action Info Input Output
ref Returns a reference to the FileLogger module instance. - result (ref)
init Loads the properties, validates the file configuration, creates the write buffer, and starts the periodic flush timer. - -
uninit Stops the flush timer, attempts a final buffer flush, and clears the module state. - -
info Writes the supplied values to the PIXERA information log and queues an entry prefixed with LUA Info: for the file. ... (-) -
warning Writes the supplied values to the PIXERA warning log and queues an entry prefixed with LUA Warning: for the file. ... (-) -
error Writes the supplied values to the PIXERA error log and queues an entry prefixed with LUA Error: for the file. ... (-) -
writeToFile Converts the supplied message to a string, optionally adds a timestamp, and places it in the write buffer. message (-) -
flushBuffer Internal action that appends all queued messages to the configured file and clears the buffer after a successful write. - -

Properties

Name Content Type Hint Options Source Options Action
Folder Path C:\ProgramData\AV Stumpfl\Pixera\logs folder - -
File Name FileLogger string - -
Add Timestamp true bool - -
Buffer Size 25 number - -
Flush Interval Seconds 1 number - -
Auto Init true bool - -
Description Writes information, warnings, and errors to a buffered log file and forwards them to the PIXERA log. Configure Folder Path and File Name before use. The buffer is written when it reaches Buffer Size messages or when Flush Interval Seconds elapses, whichever comes first. string - -
Author AV Stumpfl GmbH string - -
Logo Embedded PIXERA logo image - -
Documentation - documentation - -
Version 1.1 string - -

Changelog

  • 1.1
  • Clarified how Buffer Size and Flush Interval Seconds determine when queued messages are written to the log file.

Module Version 1.1 | 17 September 2026 | AV Stumpfl GmbH

Was this article helpful?