in packages/aws-rfdk/lib/deadline/lib/worker-configuration.ts [253:292]
protected configureCloudWatchLogStream(
worker: IHost,
id: string,
logGroupProps: LogGroupFactoryProps,
shouldInstallAgent?: boolean,
): void {
const logGroup = LogGroupFactory.createOrFetch(this, `${id}LogGroupWrapper`, id, logGroupProps);
logGroup.grantWrite(worker);
const cloudWatchConfigurationBuilder = new CloudWatchConfigBuilder(Duration.seconds(15));
if (worker.osType === OperatingSystemType.WINDOWS) {
cloudWatchConfigurationBuilder.addLogsCollectList(logGroup.logGroupName,
'UserdataExecution',
'C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Log\\UserdataExecution.log');
cloudWatchConfigurationBuilder.addLogsCollectList(logGroup.logGroupName,
'WorkerLogs',
'C:\\ProgramData\\Thinkbox\\Deadline10\\logs\\deadlineslave*.log');
cloudWatchConfigurationBuilder.addLogsCollectList(logGroup.logGroupName,
'LauncherLogs',
'C:\\ProgramData\\Thinkbox\\Deadline10\\logs\\deadlinelauncher*.log');
} else {
cloudWatchConfigurationBuilder.addLogsCollectList(logGroup.logGroupName,
'cloud-init-output',
'/var/log/cloud-init-output.log');
cloudWatchConfigurationBuilder.addLogsCollectList(logGroup.logGroupName,
'WorkerLogs',
'/var/log/Thinkbox/Deadline10/deadlineslave*.log');
cloudWatchConfigurationBuilder.addLogsCollectList(logGroup.logGroupName,
'LauncherLogs',
'/var/log/Thinkbox/Deadline10/deadlinelauncher*.log');
}
new CloudWatchAgent(this, `${id}LogsConfig`, {
cloudWatchConfig: cloudWatchConfigurationBuilder.generateCloudWatchConfiguration(),
host: worker,
shouldInstallAgent,
});
}