

# Use service logs in Amazon IoT SiteWise
<a name="gateway-local-logs"></a>

SiteWise Edge gateway devices include service log files to help debug issues. The following sections will help you find and utilize the service log files for the Amazon IoT SiteWise OPC UA Collector and Amazon IoT SiteWise Publisher components.

## Amazon IoT SiteWise OPC UA Collector service log file
<a name="collector-local-log-file"></a>

The Amazon IoT SiteWise OPC UA Collector component uses the following log file.

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.iot.SiteWiseEdgeCollectorOpcua.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.iot.SiteWiseEdgeCollectorOpcua.log
```

------

**To view this component's logs**
+ Run the following command on the core device to view this component's log file in real time. Replace *`/greengrass/v2`* or *C:\$1greengrass\$1v2* with the path to the Amazon IoT Greengrass root folder.

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.iot.SiteWiseEdgeCollectorOpcua.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.iot.SiteWiseEdgeCollectorOpcua.log -Tail 10 -Wait
  ```

------

## Amazon IoT SiteWise Publisher service log file
<a name="publisher-local-log-file"></a>

The Amazon IoT SiteWise Publisher component uses the following log file.

------
#### [ Linux ]

```
/greengrass/v2/logs/aws.iot.SiteWiseEdgePublisher.log
```

------
#### [ Windows ]

```
C:\greengrass\v2\logs\aws.iot.SiteWiseEdgePublisher.log
```

------

**To view this component's logs**
+ Run the following command on the core device to view this component's log file in real time. Replace *`/greengrass/v2`* or *C:\$1greengrass\$1v2* with the path to the Amazon IoT Greengrass root folder.

------
#### [ Linux ]

  ```
  sudo tail -f /greengrass/v2/logs/aws.iot.SiteWiseEdgePublisher.log
  ```

------
#### [ Windows (PowerShell) ]

  ```
  Get-Content C:\greengrass\v2\logs\aws.iot.SiteWiseEdgePublisher.log -Tail 10 -Wait
  ```

------