Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Manufacturing Execution System 2023 R2

Server-side diagnostic log flags

  • Last UpdatedAug 07, 2025
  • 6 minute read

The most common place to enable better diagnostic logging is on the node on which the MES middleware service is running. Use the following log flags on the specified assemblies.

FactMES.Server.Host Assembly

Flag

Description

Start-Stop

When this flag is turned on, all the steps that are executed when starting the middleware host service are logged. The step log entries contain the context data at each step. The context data can help with diagnosing any startup issues and identify at what point the startup is failing.

FactMES.Server.Services Assembly

Flag

Description

LogAsyncDetails

Async messages are stored in the message queue for the middleware to process later. Messages in the queue are assigned a sequence key and sequence number. Turning on this flag logs when the message was added to the queue along with the sequence key and a sequence number.

LogCmdStats

For retrieved datasets, logs the retrieval duration, the number of rows and columns in the dataset, and the XML retrieval request.

LogDataChangeEvents

Logs each EventBroker subscription group query and subscription data change events.

LogDeadlocks

Logs each deadlock error. Normally these are not logged because they will be retried.

LogErrorStackTrace

A commonly used flag. Logs a verbose stack trace for each error.

LogErrorXML

A commonly used flag. Logs the XML content for XML messages that fail.

LogSequenceDetails

Logs the sequence key and sequence number of a message that is being processed asynchronously.

LogTokenValidationInfo

Logs the name of the SMS server used by the MES middleware.

LogValidationError

Logs the message that was submitted if its validation fails when the synchronous or asynchronous command fails or when the event broker subscription fails.

Trace

Shows every XML message and its response as they go through the MES middleware service. It also shows all EventBroker subscriptions.

FactMES.Server.Communication Assembly

Flag

Description

LogExtraXmlElements

Logs a message when an element exists in the source XML that was not needed by the stored procedure. Setting this flag helps to detect messages if problems exist because the XML and the stored procedure do not match as expected.

LogLicenseInfo

License acquisition and release events are always logged whenever the middleware is started, restarted, or stopped. Turning on this flag additionally logs the hourly license renewals.

LogRegionUpdates

Logs information about the region when an entity is associated to a site.

LogSPandSQLCalls

Logs every stored procedure or SQL call in a format compatible with the current database. You can often cut and paste this log content into a query window and execute the SQL command outside of the middleware. This is similar to using SQL Profiler to capture SQL statements.

To use the LogSPandSQLCalls flag you must also use the Middleware Configuration Editor to set the Trace MES MWCalls parameter (in the Middleware Tracing Settings group on the Middleware Tracing Settings tab) to True. After changing the setting, restart the middleware (see Start, stop, or restart the local MES Middleware Host service). The Middleware Tracing settings can provide more powerful tracing capabilities than the Logger. For more information about these settings, see Middleware Tracing settings.

Trace

Shows miscellaneous events during message processing.

FactMES.Server.MaintenanceService Assembly: General

Flag

Description

LogAdditionalInfo

Logs a message when the system is in the middle of processing an activity while the middleware is shut down.

Applies to the following events:

  • Shift projections when there is nothing to project

  • Shift changes are halted when the middleware is shutting down

  • Sample updates are halted when the middleware is shutting down

  • Middleware startup activities

LogTransactionComplete

Logs the activity information and how long the activity took to complete after processing the middleware call successfully.

For a single activity transaction, the transaction complete is based on the single call to the middleware. When an activity contains more than one middleware call (e.g., a shift change for each entity), then the transaction complete is logged after finishing the shift change on all entities.

Applies to the following events:

  • Scheduled tasks: daily, hourly, minutely, daily custom, hourly custom.

  • SCC Check for Triggers.

  • SCC Handle Event Changes.

  • Creating utilization shift links on an hourly basis.

  • Creating and updating job hourly buckets.

  • QM sample, ready, update, and extend events, when all these three activities are completed for all the entities that can capture QM data.

  • When the Regenerate Samples flag (regen_samples in the db_status table) is reset to false.

    When QM configuration elements that are related to sample generation are changed, the Regenerate Samples flag is set to true. This indicates that the middleware has to regenerate samples because there is a change in the configuration. Changes to the following cause this flag to be set to true: QM specifications, characteristics, QM specification‑characteristic links, and sample frequencies.

    When the next minutely tasks after the change occurred are being executed and this flag is true, the middleware regenerates the samples for all the entities using the new configuration and then resets this flag back to false.

  • Sample generation is complete.

  • Post shift change on all entities.

  • Completion of the shift change for all entities.

  • Completion of a post shift change process update.

  • Completion of shift projections for all entities.

LogXMLRequest

Logs XML requests. The XML payload is logged before the request is sent to the middleware so that the XML request is captured and can be referred to in case the request fails.

Applies to the following events:

  • Getting MES Service Identity to verify whether the host machine can run the maintenance tasks or not

  • Clearing MES Host Identify upon middleware shutdown

  • Scheduled tasks: daily, hourly, minutely, daily custom, hourly custom

  • SCC Check for Triggers

  • SCC Handle Event Changes

  • Creating utilization shift links on an hourly basis

  • Creating and updating job hourly buckets

  • Startup activities

FactMES.Server.MaintenanceService Assembly: Shifts

Flag

Description

LogPostShiftChange

Logs the events that are processed after a successful shift change, such as sample generation and production and consumption fixes. Messages are logged only when there is a successful shift change on the entity.

LogShiftDecisionPoints

For each entity for which a shift change is being performed, logs a message at each point when the system is taking a decision to determine the type of shift schedule that is applicable to the entity.

The LogShiftDecisionPoints logs fewer messages for an entity when compared to TraceShiftChange flag. Although these two flags can be independently enabled or disabled, when turning on the TraceShiftChange flag it is recommended to also turn on the LogShiftDecisionPoints flag to get comprehensive shift change information.

LogShiftProjectionDecisionPoints

For each entity for which projected shifts are being changed, logs a message at each point when the system is taking a decision to determine the type of shift schedule that is applicable to the entity.

LogXMLRequestShiftChange

For each entity, logs the XML payload containing the shift change information that is sent to the middleware for the shift change. The trace messages for the TraceShiftChange, LogShiftDecisionPoints, and LogPostShiftChange flags only provide information about how the shifts are determined for the entity, but not necessarily the final XML that is sent to the middleware. The XML payload is logged before the request is sent to the middleware so that the XML request is captured and can be referred to in case the request fails.

LogXMLRequestShiftProjections

For each entity, logs the XML payload containing the shift projection information that is sent to the middleware. The XML payload is logged before the request is sent to the middleware so that the XML request is captured and can be referred to in case the request fails.

TraceShiftChange

For each entity for which a shift change is being performed, logs a message that provides more details about the shift change.

TraceShiftProjections

For each entity for which projected shifts are being changed, logs a message that provides details about the shift projections.

FactMES.Server.MaintenanceService Assembly: Quality Management Samples

Flag

Description

LogSampleDecisionPoints

For each entity that is processing samples, logs any change in the event processing. Examples include when events such as sample generation or updates are skipped as a result of changing shifts or when sample updates are stopped because the middleware was shutting down.

LogSampleOverRuns

Logs a message when the total amount of time to ready samples, to extend samples, or to update sample status for all entities exceeds the amount of time configured in the system attribute 417, Frequency to call sample updates (in seconds).

Note that a message will be logged only when the total amount of time exceeds this configured amount of time and not simply each time the sample is updated or extended.

LogXMLRequestSampleGeneration

Logs the XML request for each entity for which samples are being readied or extended and for each entity for which sample status is being updated. The XML payload is logged before the request is sent to the middleware so that the XML request is captured and can be referenced in case the request fails.

TraceSampleGeneration

After successful completion of the sample generation middleware call for an entity, logs each sample ready, update, or extend request for the entity. Also, logs additional tracing information when the middleware is shut down, the Regenerate Samples flag is reset to false, readying samples for all entities has been completed, or there are no entities in the MES database that can capture QM data and so there is no need to process sample updates.

In This Topic
TitleResults for “How to create a CRG?”Also Available in