# SyslogLogDriverProps

Specifies the syslog log driver configuration options.

[Source](https://docs.docker.com/config/containers/logging/syslog/)

Extends: [BaseLogDriverProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.BaseLogDriverProps.html)
Used as props by: [SyslogLogDriver](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.SyslogLogDriver.html)
Used as argument in: [LogDrivers.syslog](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.LogDrivers.html#syslog)

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

## 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 syslogLogDriverProps: ecs.SyslogLogDriverProps = {
  address: 'address',
  env: ['env'],
  envRegex: 'envRegex',
  facility: 'facility',
  format: 'format',
  labels: ['labels'],
  tag: 'tag',
  tlsCaCert: 'tlsCaCert',
  tlsCert: 'tlsCert',
  tlsKey: 'tlsKey',
  tlsSkipVerify: 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

syslog_log_driver_props = ecs.SyslogLogDriverProps(
    address="address",
    env=["env"],
    env_regex="envRegex",
    facility="facility",
    format="format",
    labels=["labels"],
    tag="tag",
    tls_ca_cert="tlsCaCert",
    tls_cert="tlsCert",
    tls_key="tlsKey",
    tls_skip_verify=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.*;

SyslogLogDriverProps syslogLogDriverProps = SyslogLogDriverProps.builder()
        .address("address")
        .env(List.of("env"))
        .envRegex("envRegex")
        .facility("facility")
        .format("format")
        .labels(List.of("labels"))
        .tag("tag")
        .tlsCaCert("tlsCaCert")
        .tlsCert("tlsCert")
        .tlsKey("tlsKey")
        .tlsSkipVerify(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 syslogLogDriverProps = new SyslogLogDriverProps {
    Address = "address",
    Env = new [] { "env" },
    EnvRegex = "envRegex",
    Facility = "facility",
    Format = "format",
    Labels = new [] { "labels" },
    Tag = "tag",
    TlsCaCert = "tlsCaCert",
    TlsCert = "tlsCert",
    TlsKey = "tlsKey",
    TlsSkipVerify = 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"

syslogLogDriverProps := &SyslogLogDriverProps{
	Address: jsii.String("address"),
	Env: []*string{
		jsii.String("env"),
	},
	EnvRegex: jsii.String("envRegex"),
	Facility: jsii.String("facility"),
	Format: jsii.String("format"),
	Labels: []*string{
		jsii.String("labels"),
	},
	Tag: jsii.String("tag"),
	TlsCaCert: jsii.String("tlsCaCert"),
	TlsCert: jsii.String("tlsCert"),
	TlsKey: jsii.String("tlsKey"),
	TlsSkipVerify: jsii.Boolean(false),
}
```

## Properties

- `address`: string — The address of an external syslog server.

  **Default:** If the transport is tcp, udp, or tcp+tls, the default port is 514.

  The URI specifier may be
  [tcp|udp|tcp+tls]://host:port, unix://path, or unixgram://path.

- `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.

- `facility`: string — The syslog facility to use.

  **Default:** facility not set

  Can be the number or name for any valid
  syslog facility. See the syslog documentation:
  https://tools.ietf.org/html/rfc5424#section-6.2.1.

- `format`: string — The syslog message format to use.

  **Default:** format not set

  If not specified the local UNIX syslog
  format is used, without a specified hostname. Specify rfc3164 for the RFC-3164
  compatible format, rfc5424 for RFC-5424 compatible format, or rfc5424micro
  for RFC-5424 compatible format with microsecond timestamp resolution.

- `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.

- `tlsCaCert`: string — The absolute path to the trust certificates signed by the CA.

  **Default:** tlsCaCert not set

  Ignored
  if the address protocol is not tcp+tls.

- `tlsCert`: string — The absolute path to the TLS certificate file.

  **Default:** tlsCert not set

  Ignored if the address
  protocol is not tcp+tls.

- `tlsKey`: string — The absolute path to the TLS key file.

  **Default:** tlsKey not set

  Ignored if the address protocol
  is not tcp+tls.

- `tlsSkipVerify`: boolean = false — If set to true, TLS verification is skipped when connecting to the syslog daemon.

  Ignored if the address protocol is not tcp+tls.
