Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

Adeptia Connect logs messages in console as well as in the log database during the execution of a service (for example, a Process Flow) to help you monitor and troubleshoot the application. Message logging is done at four levels: ERROR, NOTICE, INFO, and DEBUG. The NOTICE log level captures all the notable events in the application including the error messages. For example, the Cluster and Queue Processor component log messages at the NOTICE log level. Adeptia Connect logs startup message for the microservices when they start.

Info
Adeptia recommends that you set the log level to NOTICE for logging messages.

The following sections describe the types of logging, benefits and constraints, format of log messageslogging configuration, and configurable properties.

There are two types of logging that Adeptia Connect supports. 

Synchronous

Anchor
Asynchronous logging
Asynchronous logging
Asynchronous logging

info

By default, Asynchronous logging is enabled in Adeptia Connect.

Click here to get more details. AnchorSynchronous loggingSynchronous loggingSynchronous logging

In Synchronous logging, the application logs the messages as and when there is one to be logged and execution of the service is put on hold until the complete message is written in the log. For example, If there are three error messages generated during a Process Flow execution, the execution proceeds to the next stage only after these three error messages are logged. The same execution thread is used for logging also which leads to a stalled execution of the service for the time while the messages are being logged.

AnchorAsynchronous loggingAsynchronous loggingAsynchronous logging

 In Asynchronous logging, the logging happens in a thread that is separate from the service execution thread. This leads to an uninterrupted execution of the service as it does not need to wait for the logging to be completed. An effective logging mechanism depends on two key factors, low latency and maximum throughput. 

  • Latency: Time taken for performing the action and producing the result. 
  • Throughput: The number of actions executed per unit of time.
InfoAdeptia recommends that you use asynchronous logging to substantially improve

Asynchronous logging substantially improves the throughput and

lower

lowers the latency in the overall execution of

the service

a service.

The following sections describe the benefits and constraintsformat of log messageslogging properties.

Anchor
Benefits and constraints
Benefits and constraints
Benefits and constraints of Asynchronous logging

Asynchronous logging benefits a user in terms of achieving lower latency and maximum throughput. 

  • Maximum throughput: With an asynchronous logger, it can log messages at a higher rate in comparison to synchronous logger.
  • Lower latency: As the logging occurs in a separate thread, it significantly lowers the latency to the minimum in the overall execution of the service.

Although asynchronous logging can give significant performance benefits, it has the following limitations to take into account:

  • In case of an abrupt shutdown which is a rare scenario, the log messages get are lost if they are present in the async Asynchronous queue and have not been already logged.

    Info
    In case of graceful shutdown, Adeptia Connect implements a shutdown hook to ensure that all logs in the queue are logged before bringing the application down.


  • In case of a vast number of messages to be logged, the log may display the messages with a delay or after the execution of the service.

Anchor
Format of log messages
Format of log messages
Format of log messages

The actual message in the log is accompanied by several other useful information. All the information in the logs is stored in key-value pair format. Storing the information in key-value pair format in the logs has its advantage – the mapped key-value pattern proves to be useful as it tells you what is the meaning of each field that is being printed on the console or file and the log database.

The following example gives you an idea about the log message format:

2020-03-17 12:52:48,785 INFO [Adeptia Connect 3.2 Kernel Thread] system com system com.adeptia.indigo.event.QuartzEventFactory.activateAutoCleanupService(QuartzEventFactory.java:636)

- category category="initializeEvent" groupId="administrators" message="DEFAULT.autoCleanup will run at: Sat May 23 03:00:00 UTC 2020" nodeName="10.0.0.72" userId="admin"

Anchor

Logging configuration

properties

Logging configuration

properties
Logging

configuration

properties

Logging parameters properties are pre-configured in the application. However, if you want to update the configuration parameters, you can follow the steps below to navigate to the Asynchronous logging properties window and update the properties:

  • Click Accounts > Settings.
  • Expand the Server Node Settings in the left panel.
  • Select the server node.
  • Click Edit.
  • Navigate to Systems > Asynchronous Logging.

    Image Removed
    Info
    Setting the abpm.log4j.async.logging.enable property to false changes the logging to be in Synchronous mode. By default, this property is set to true. You can also update the rest of the listed properties based on your requirements.
    AnchorConfiguring propertiesConfiguring propertiesProperties configuration

    If required, you can configure the logger properties in server-configure.properties file. Follow the steps below to perform this action:

  • Go to …<ConnectServerInstallFolder>\AdeptiaServer\ServerKernel\etc location.
  • Open server-configure.properties file.
  • The following table contains the list of configurable properties:

    PropertyDescriptionPossible valuelog4j.rootLogger
    System and process flow logging level. For production server, it is recommended to use NOTICE log level.ERROR, NOTICE, INFO, and DEBUG
    log4j.logger.EventEvents logging level. For production server, it is recommended to use NOTICE log level or leave it without any value. In case of no value, it will consider the logging level from the property log4j.rootLogger.ERROR, NOTICE, INFO, and DEBUG. Or, you can leave it without any value.log4j.logger.runtimeRuntime logging level. For production server, it is recommended to use NOTICE log level or leave it without any value. In case of no value, it will consider the logging level from the property log4j.rootLogger.ERROR, NOTICE, INFO, and DEBUG. Or, you can leave it without any value.log4j.logger.auditAudit logging level. For production server, it is recommended to use NOTICE log level or leave it without any value. In case of no value, it will consider the logging level from the property log4j.rootLogger.ERROR, NOTICE, INFO, and DEBUG. Or, you can leave it without any value.log4j.logger.systemSystem logging level. For production server, it is recommended to use NOTICE log level or leave it without any value. In case of no value, it will consider the logging level from the property log4j.rootLogger.ERROR, NOTICE, INFO, and DEBUG. Or, you can leave it without any value.abpm.log4j.async.logging.enableEnable/disable asynchronous logging in the application.true or falselog4j2.asyncLoggerExceptionHandlerName of a class that will be notified when an exception
    occurs while logging the messages.
    Name of the class. For example,
    com.adeptia.indigo.logging.
    AsyncLoggerExceptionHandler.
    log4j2.asyncLoggerRingBufferSizeSize (number of slots) in the RingBuffer used by the asynchronous
    logging subsystem.Minimum size = 128.
    Maximum size = Based on your requirements.log4j2.asyncQueueFullPolicyTo drop events whose level is equal or less than the threshold level
    (INFO by default) when the queue is full.Discardlog4j2.discardThresholdTo determine which events to be dropped when the queue becomes full.
    This works only when 'log4j2.asyncQueueFullPolicy' property is set.ERROR, INFO, and DEBUG

    Restart the Connect Server.

    Configuring SMTP and Windows NTEvent Appender 

    In case you have been using SMTP and Windows NTEvent Appender for message logging in the previous version, you need to configure these two Appenders in this version of Adeptia Connect.

    AnchorSMTP AppenderSMTP AppenderConfiguring SMTP Appender

    If you want the log messages to be delivered to your email, you need to configure the SMTP Appender and update its properties as explained below:

  • Go to …<ConnectServerInstallFolder>\AdeptiaServer\ServerKernel\etc location.
  • Open server-configure.properties file.
  • Set the abpm.log4j.appender.smtp.enable property value as true.
  • The following table contains the list of configurable properties:

    PropertyDescriptionPossible valueabpm.log4j.appender.smtp.enableEnable and Disable the SMTP Appender.true/falselog4j.appender.smtp.To List of recipient email addresses separated by commas.user-definedlog4j.appender.smtp.CcList of recipient email addresses that will be carbon copied separated by commas.user-definedlog4j.appender.smtp.BccList of recipient email addresses that will be blind carbon copied separated by commas. user-definedlog4j.appender.smtp.FromThe email address of the sender.  user-definedlog4j.appender.smtp.ReplytoThe 'Reply to' email address.  user-definedlog4j.appender.smtp.SubjectThe subject line of the email.user-definedlog4j.appender.smtp.Protocol The transport protocol.user-definedlog4j.appender.smtp.SMTPHost The SMTP relay mail server to be used to send the email messages.  user-definedlog4j.appender.smtp.Port The port on which the SMTP server is listening.user-definedlog4j.appender.smtp.UserNameThe username to be used to authenticate with the SMTP server. user-definedlog4j.appender.smtp.PasswordThe password to be used to authenticate with the SMTP server.user-definedlog4j.appender.smtp.Debug

    Enable Debug to analyze the standard system output if an error occurs, such as an SMTP login failure.

    Warning
    It should not be used during production because username and password information may be included in the output.

    Debug logs are printed in the WebrunnerApplication.log file.

    true/falselog4j.appender.smtp.BufferSizeThe cyclic buffer used to hold the logging events.  user-definedlog4j.appender.smtp.ThresholdThe threshold level of this appender.ERROR, INFO, and DEBUG
    Note
    If you are sending mail through the Gmail server then you need to enable the less secure app property in Gmail.
  • Restart the Connect Server.
  • Anchor Event Viewer Event ViewerConfiguring Windows NTEvent Appender

    If you want the log messages to be recorded in the Event Viewer, you need to configure the Windows NTEvent Log Appender and update its properties as explained below:

  • Copy the NTEventLogAppender.amd64.dll, NTEventLogAppender.x86.dll, and NTEventLogAppender.dll files from the …<ConnectServerInstallFolder>\AdeptiaServer\ServerKernel\etc folder and paste them into …<ConnectServerInstallFolder>\jre\bin location.

    Tip

    To check for the possible path or folder for storing the DLLs files, follow the instruction below:

    1. Click Configure > Developer Studio > Proceed.

    2. Click Administer > Setup > Application Setting > System Configuration.

    3. Search for java.library.path to find the location where you can place the DLLs files. 

  • Go to …<ConnectServerInstallFolder>\AdeptiaServer\ServerKernel\etc location.
  • Open server-configure.properties file.
  • Set the abpm.log4j.appender.ntevent.enable property value as true.

    Tip
    You can update the log4j.appender.ntevent.threshold property in server-configure.properties file to set the threshold level of this Appender. By default, its level is set to ERROR.
  • Restart the Connect Server.
  • To check the log messages in the Event Viewer, follow the steps below:
  • Go to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools folder.
  • Click Event Viewer to open.
  • On the left pane. expand Windows  Logs and then select Application to take a look at the log messages. 

    TipThe log messages under the Log4j source are from Adeptia Connect application

    for Adeptia Connect microservices. However, you can configure them based on your requirement. For a complete list of logging properties related to different microservices, refer to the application properties page.