# FirelensOptions

The options for firelens log router https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef-customconfig.

- Source: [`aws-ecs/lib/firelens-log-router.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/firelens-log-router.ts#L50)
- Type last changed: v2.34.0 · 29 Jul 2022

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
const firelensOptions: ecs.FirelensOptions = {
  configFileType: ecs.FirelensConfigFileType.S3,
  configFileValue: 'configFileValue',
  enableECSLogMetadata: false,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ecs as ecs

firelens_options = ecs.FirelensOptions(
    config_file_type=ecs.FirelensConfigFileType.S3,
    config_file_value="configFileValue",
    enable_ecs_log_metadata=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;

FirelensOptions firelensOptions = FirelensOptions.builder()
        .configFileType(FirelensConfigFileType.S3)
        .configFileValue("configFileValue")
        .enableECSLogMetadata(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ECS;

var firelensOptions = new FirelensOptions {
    ConfigFileType = FirelensConfigFileType.S3,
    ConfigFileValue = "configFileValue",
    EnableECSLogMetadata = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

firelensOptions := &FirelensOptions{
	ConfigFileType: awscdk.Aws_ecs.FirelensConfigFileType_S3,
	ConfigFileValue: jsii.String("configFileValue"),
	EnableECSLogMetadata: jsii.Boolean(false),
}
```

## Properties

- `configFileType`: [FirelensConfigFileType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.FirelensConfigFileType.html) — Custom configuration file, s3 or file.

  **Default:** determined by checking configFileValue with S3 ARN.

  Both configFileType and configFileValue must be used together
  to define a custom configuration source.

- `configFileValue`: string — Custom configuration file, S3 ARN or a file path Both configFileType and configFileValue must be used together to define a custom configuration source.

  **Default:** no config file value

- `enableECSLogMetadata`: boolean = true — By default, Amazon ECS adds additional fields in your log entries that help identify the source of the logs.

  You can disable this action by setting enable-ecs-log-metadata to false.
