# BaseLogDriverProps

- Source: [`aws-ecs/lib/log-drivers/base-log-driver.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/log-drivers/base-log-driver.ts#L1)

## 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 baseLogDriverProps: ecs.BaseLogDriverProps = {
  env: ['env'],
  envRegex: 'envRegex',
  labels: ['labels'],
  tag: 'tag',
};
```

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

base_log_driver_props = ecs.BaseLogDriverProps(
    env=["env"],
    env_regex="envRegex",
    labels=["labels"],
    tag="tag"
)
```

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.*;

BaseLogDriverProps baseLogDriverProps = BaseLogDriverProps.builder()
        .env(List.of("env"))
        .envRegex("envRegex")
        .labels(List.of("labels"))
        .tag("tag")
        .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 baseLogDriverProps = new BaseLogDriverProps {
    Env = new [] { "env" },
    EnvRegex = "envRegex",
    Labels = new [] { "labels" },
    Tag = "tag"
};
```

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"

baseLogDriverProps := &BaseLogDriverProps{
	Env: []*string{
		jsii.String("env"),
	},
	EnvRegex: jsii.String("envRegex"),
	Labels: []*string{
		jsii.String("labels"),
	},
	Tag: jsii.String("tag"),
}
```

## Properties

- `env`: string[] — The env option takes an array of keys.

  **Default:** No env

  If there is collision between
  label and env keys, the value of the env takes precedence. Adds additional fields
  to the extra attributes of a logging message.

- `envRegex`: string — The env-regex option is similar to and compatible with env.

  **Default:** No envRegex

  Its value is a regular
  expression to match logging-related environment variables. It is used for advanced
  log tag options.

- `labels`: string[] — The labels option takes an array of keys.

  **Default:** No labels

  If there is collision
  between label and env keys, the value of the env takes precedence. Adds additional
  fields to the extra attributes of a logging message.

- `tag`: string — By default, Docker uses the first 12 characters of the container ID to tag log messages.

  **Default:** The first 12 characters of the container ID

  Refer to the log tag option documentation for customizing the
  log tag format.
