class LoggingFormat
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppMesh.LoggingFormat |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappmesh#LoggingFormat |
Java | software.amazon.awscdk.services.appmesh.LoggingFormat |
Python | aws_cdk.aws_appmesh.LoggingFormat |
TypeScript (source) | aws-cdk-lib » aws_appmesh » LoggingFormat |
Configuration for Envoy Access Logging Format for mesh endpoints.
Example
declare const mesh: appmesh.Mesh;
declare const service: cloudmap.Service;
const node = new appmesh.VirtualNode(this, 'node', {
mesh,
serviceDiscovery: appmesh.ServiceDiscovery.cloudMap(service),
listeners: [appmesh.VirtualNodeListener.http({
port: 8080,
healthCheck: appmesh.HealthCheck.http({
healthyThreshold: 3,
interval: cdk.Duration.seconds(5),
path: '/ping',
timeout: cdk.Duration.seconds(2),
unhealthyThreshold: 2,
}),
timeout: {
idle: cdk.Duration.seconds(5),
},
})],
backendDefaults: {
tlsClientPolicy: {
validation: {
trust: appmesh.TlsValidationTrust.file('/keys/local_cert_chain.pem'),
},
},
},
accessLog: appmesh.AccessLog.fromFilePath('/dev/stdout',
appmesh.LoggingFormat.fromJson(
{testKey1: 'testValue1', testKey2: 'testValue2'})),
});
Initializer
new LoggingFormat()
Methods
Name | Description |
---|---|
bind() | Called when the Access Log Format is initialized. |
static from | Generate logging format from json key pairs. |
static from | Generate logging format from text pattern. |
bind()
public bind(): LoggingFormatConfig
Returns
Called when the Access Log Format is initialized.
Can be used to enforce mutual exclusivity with future properties
static fromJson(jsonLoggingFormat)
public static fromJson(jsonLoggingFormat: { [string]: string }): LoggingFormat
Parameters
- jsonLoggingFormat
{ [string]: string }
Returns
Generate logging format from json key pairs.
static fromText(text)
public static fromText(text: string): LoggingFormat
Parameters
- text
string
Returns
Generate logging format from text pattern.