Step 10: Check the logs
SimSpace Weaver writes simulation management messages and the console output from your apps to Amazon CloudWatch Logs. For more information on working with logs, see Working with log groups and log streams in the Amazon CloudWatch Logs User Guide.
Each simulation that you create has its own log group
in CloudWatch Logs. The name of the log group is specified in the simulation schema.
In the following schema snippet, the value of log_destination_service
is logs
. This means that the value of log_destination_resource_name
is the name of a log group. In this case, the log group is MySimulationLogs
.
simulation_properties: log_destination_service: "logs" log_destination_resource_name: "MySimulationLogs" default_entity_index_key_type: "Vector3<f32>"
You can also use the DescribeSimulation API to find the name of the log group for simulation after you start it.
If you use AWS IAM Identity Center (successor to AWS Single Sign-On) or named profiles for the AWS Command Line Interface (AWS CLI), you must use SimSpace Weaver app SDK version 1.12.1 or higher.
The latest version is 1.12.2. For information about SimSpace Weaver versions, see SimSpace Weaver versions.
The SimSpace Weaver app SDK scripts use the AWS CLI. If you use IAM Identity Center, you can either copy your IAM Identity Center profile for the AWS CLI to your default
profile or provide the name
of your IAM Identity Center profile to SimSpace Weaver app SDK scripts with the --profile
parameter. For more information, see
Configuring the AWS CLI to use AWS IAM Identity Center (successor to AWS Single Sign-On) in the
AWS Command Line Interface User Guide and Named
profiles for the AWS CLI in the AWS Command Line Interface User Guide.cli-profile-name
The following example shows the part of the output from DescribeSimulation
that describes the logging configuration. The name of the log group is shown at the end of the
LogGroupArn
.
"LoggingConfiguration": { "Destinations": [ { "CloudWatchLogsLogGroup": { "LogGroupArn": "arn:aws:logs:us-west-2:111122223333:log-group:MySimulationLogs" } } ] },
Each simulation log group contains several log streams:
-
Management log stream – simulation management messages produced by the SimSpace Weaver service.
/sim/management
-
Errors log stream – error messages produced by the SimSpace Weaver service. This log stream only exists if there are errors. SimSpace Weaver stores errors written by your apps in their own app log streams (see the following log streams).
/sim/errors
-
Spatial app log streams (1 for each spatial app on each worker) – console output produced by spatial apps. Each spatial app writes to its own log stream. The
spatial-app-id
is all characters after the trailing slash at the end of theworker-id
./domain/
spatial-domain-name
/app/worker-worker-id
/spatial-app-id
-
Custom app log streams (1 for each custom app instance) – console output produced by custom apps. Each custom app instance writes to its own log stream.
/domain/
custom-domain-name
/app/custom-app-name
/random-id
-
Service app log streams (1 for each service app instance) – console output produced by service apps. Each service app writes to its own log stream. The
service-app-id
is all characters after the trailing slash at the end of theservice-app-name
./domain/
service-domain-name
/app/service-app-name
/service-app-id
The sample application doesn't have service apps.