Class JsonFileLogDriverProps
Specifies the json-file log driver configuration options.
Inheritance
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class JsonFileLogDriverProps : Object, IJsonFileLogDriverProps, IBaseLogDriverProps
Syntax (vb)
Public Class JsonFileLogDriverProps
Inherits Object
Implements IJsonFileLogDriverProps, IBaseLogDriverProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// 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 jsonFileLogDriverProps = new JsonFileLogDriverProps {
Compress = false,
Env = new [] { "env" },
EnvRegex = "envRegex",
Labels = new [] { "labels" },
MaxFile = 123,
MaxSize = "maxSize",
Tag = "tag"
};
Synopsis
Constructors
JsonFileLogDriverProps() |
Properties
Compress | Toggles compression for rotated logs. |
Env | The env option takes an array of keys. |
EnvRegex | The env-regex option is similar to and compatible with env. |
Labels | The labels option takes an array of keys. |
MaxFile | The maximum number of log files that can be present. |
MaxSize | The maximum size of the log before it is rolled. |
Tag | By default, Docker uses the first 12 characters of the container ID to tag log messages. |
Constructors
JsonFileLogDriverProps()
public JsonFileLogDriverProps()
Properties
Compress
Toggles compression for rotated logs.
public Nullable<bool> Compress { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: - false
Env
The env option takes an array of keys.
public string[] Env { get; set; }
Property Value
System.String[]
Remarks
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.
Default: - No env
EnvRegex
The env-regex option is similar to and compatible with env.
public string EnvRegex { get; set; }
Property Value
System.String
Remarks
Its value is a regular expression to match logging-related environment variables. It is used for advanced log tag options.
Default: - No envRegex
Labels
The labels option takes an array of keys.
public string[] Labels { get; set; }
Property Value
System.String[]
Remarks
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.
Default: - No labels
MaxFile
The maximum number of log files that can be present.
public Nullable<double> MaxFile { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
If rolling the logs creates excess files, the oldest file is removed. Only effective when max-size is also set. A positive integer.
Default: - 1
MaxSize
The maximum size of the log before it is rolled.
public string MaxSize { get; set; }
Property Value
System.String
Remarks
A positive integer plus a modifier representing the unit of measure (k, m, or g).
Default: - -1 (unlimited)
Tag
By default, Docker uses the first 12 characters of the container ID to tag log messages.
public string Tag { get; set; }
Property Value
System.String
Remarks
Refer to the log tag option documentation for customizing the log tag format.
Default: - The first 12 characters of the container ID