Login/Register
  • Home
  • Community
  • Knowledge
  • Technical Docs
  • RWS Support Policy
  • Trados Studio Licensing Help
  • Login for Support
Back to Search Results

Language Weaver Edge - How to configure logging for Language Weaver Edge 8.x

000017513 |2/9/2023 12:07 PM
Scope/Environment
Language Weaver Edge
Symptoms/Context
Instructions on how to configure the logging level in Language Weaver Edge to provide more granular information.

The default value in the main-config.json file is always "NOTICE". 
Resolution
When troubleshooting Language Weaver Edge, it might be useful to review the logs generated by its services.

This guide shows the steps to configure logging for each service.
NOTE: Before making changes to main-config.json  please stop SDL MT Edge service and take a backup of main-config.json

Log Locations

On each Language Weaver Edge controller or worker host, a set of log files is automatically generated when the services run. By default, the location of the logs are in the MTE_INSTALL_DIR/logs folder:
  • Windows: C:\Program Files\SDL\SDL ETS\logs
  • Linux: /opt/sdl/ets/logs

Log Configuration

Each service has a specified log configuration that specifies the following options:
  • maxSizeInMB - the maximum size the log file is allowed to grow before it's rolled over. Once the maximum size is exceeded, the current file will be backed up and new log file will be created.
  • maxBackups - the maximum number of backups allowed as part of the rollover above. A maximum of 10 backups is allowed.
  • logFile - path to the file used to store the log contents
  • logLevel - the verbosity of logged messages; the higher the verbosity, the more detailed the messages logged will be.
    • For api-gateway, app-server, manager, and host-agent, the allowed levels in order of low-high verbosity are:
      • "CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG "
    • For the job-engine, translation-engine, and license-server, the allowed numerical levels in order of low-high verbosity are:
      • 0 (FATAL), 1 (ERROR), 2 (WARNING), 3 (INFO), 4 (DEBUG)
When modifying the configuration files, stop the MTE service, change the configuration, and start the MTE service, on each host.

api-gateway

The Language Weaver Edge master/controller host runs the api-gateway service which provides the REST API endpoint. Its configuration is located in MTE_INSTALL_DIR/conf/main-config.json; a sample of the relevant section to configure the logging settings is shown below:

 
"apiGateway": {
    "logging": {
        "maxSizeInMB": 10,
        "maxBackups": 1,
        "logFile": "/opt/sdl/ets/logs/api-gateway.log",
        "logLevel": "NOTICE"
    },
 

app-server

The MTE master/controller host runs the app-server service which provides the HTTP Web UI. Its configuration is located in MTE_INSTALL_DIR/conf/main-config.json; a sample of the relevant section to configure the logging settings is shown below:

 
"appServer": {
    "logging": {
        "maxSizeInMB": 10,
        "maxBackups": 1,
        "logFile": "/opt/sdl/ets/logs/app-server.log",
        "logLevel": "NOTICE"
    }
 

host-agent

Each MTE host has a single host-agent service used for internal service orchestration. Its configuration is located in MTE_INSTALL_DIR/conf/main-config.json; a sample of the relevant section to configure the logging settings is shown below:
"hostAgent": {
    "logging": {
        "maxSizeInMB": 10,
        "maxBackups": 1,
        "logFile": "/opt/sdl/ets/logs/host-agent.log",
        "logLevel": "NOTICE"
    }
 

Manager

Each MTE host has a single manager service which serves as the parent of all other services. It launches, monitors and restarts the running MTE services. Its configuration is located in MTE_INSTALL_DIR/conf/main-config.json; a sample of the relevant section to configure the logging settings is shown below:
"manager": {
    "logging": {
        "maxSizeInMB": 10,
        "maxBackups": 1,
        "logFile": "/opt/sdl/ets/logs/manager.log",
        "logLevel": "NOTICE"
    }
 

job-engine & translation-engine

Each MTE host may have 0 or more job-engines (responsible for preprocessing the input) or translation-engines (responsible for translating segments).
Its configuration is located in MTE_INSTALL_DIR/conf/[job|translation]-engine.*.json; a sample of the relevant section to configure the logging settings is shown below: (restart the engine after making changes to the configuration file)

 
"etsEngine": {
    "common": {
        "log": {
            "path": "/opt/sd/ets/logs/job-engine.eddb.log",
            "level": 3,
            "maxBackups": 1,
            "maxFileSizeInKB": 10000
        }


Using a high verbose logging level will cause more log rolling to occur and may result in less data being retained. Adjust the maximum allowed log size, or backups to compensate.
translation-engine segment logging
A translation engine can be configured to log individual segments that it translates to a yaml file via the etsEngine.common.yamlLog options.
This configuration can be set manually in each MTE_INSTALL_DIR/conf/translation-engine.*.json of interest, a sample of the configuration is shown below. (restart the engine after making changes to the configuration file)
"etsEngine": {
    "common": {
        "log": {
            "path": "/opt/sd/ets/logs/translation-engine.80dd.log"
        },
      "yamlLog": {
          "path": "/opt/sd/ets/logs/translation-engine.80dd.yml",
          "level": 3
      }

Description of configuration values:
  • yamlLog.path - full file path to save the logged segments
  • yamlLog.level - level of details to log
    0: Log nothing (default
    1: Log segments that are reported to have warnings or errors
    2: Log all source segments
    3: Log all source and translated segments
  • yamlLog.usernames - comma separated list of usernames to filter by; the default empty value means no filtering applied

Enable HTTP request logging for LW Edge 8.5.x and above.
  • On the controller host, stop the MTE service if it's running.
  • Modify the main-config.json file and add the attributes:

    • apiGateway.logging.httpRequestLogging.enabled: true

    • appServer.logging.httpRequestLogging.enabled: true

"appServer": {
...
    "logging": {
        "maxSizeInMB": 10,
        "maxBackups": 1,
        "logFile": "C:\\Program Files\\SDL\\SDL ETS\\logs\\app-server.log",
        "logLevel": "NOTICE",
        "httpRequestLogging": {
            "enabled": true,
            "logLevel": "NOTICE",
            "logFile": "C:\\Program Files\\SDL\\SDL ETS\\logs\\app-server.http.log"
        }
    }
},
"apiGateway": {
...
    "logging": {
        "maxSizeInMB": 10,
        "maxBackups": 1,
        "logFile": "C:\\Program Files\\SDL\\SDL ETS\\logs\\api-gateway.log",
        "logLevel": "NOTICE",
        "httpRequestLogging": {
            "enabled": true,
            "logLevel": "NOTICE",
            "logFile": "C:\\Program Files\\SDL\\SDL ETS\\logs\\api-gateway.http.log"
        }
    }
}
  • Start the MTE service. The log folder should contain the new app-server.http.log and api-gateway.http.log files with the respective requests.


Note: Having http logging enabled may impact performance so it should be used for troubleshooting or non-production use only.
To disable http logging, follow the same steps above and set the *.httpRequestLogging.enabled property to false.


 
Root Cause
Reference
Send Article Feedback
RWS Machine Translation Translation Software Language Services Content Management
All Contents Copyright © RWS.
COPYRIGHT PRIVACY POLICY COOKIE POLICY TERMS AND CONDITIONS