1 | ;
|
2 | var _a;
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.FluentdLogDriver = void 0;
|
5 | const jsiiDeprecationWarnings = require("../../.warnings.jsii.js");
|
6 | const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
7 | const log_driver_1 = require("./log-driver");
|
8 | const utils_1 = require("./utils");
|
9 | /**
|
10 | * A log driver that sends log information to journald Logs.
|
11 | */
|
12 | class FluentdLogDriver extends log_driver_1.LogDriver {
|
13 | /**
|
14 | * Constructs a new instance of the FluentdLogDriver class.
|
15 | *
|
16 | * @param props the fluentd log driver configuration options.
|
17 | */
|
18 | constructor(props = {}) {
|
19 | super();
|
20 | this.props = props;
|
21 | try {
|
22 | jsiiDeprecationWarnings._aws_cdk_aws_ecs_FluentdLogDriverProps(props);
|
23 | }
|
24 | catch (error) {
|
25 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
26 | Error.captureStackTrace(error, FluentdLogDriver);
|
27 | }
|
28 | throw error;
|
29 | }
|
30 | }
|
31 | /**
|
32 | * Called when the log driver is configured on a container
|
33 | */
|
34 | bind(_scope, _containerDefinition) {
|
35 | try {
|
36 | jsiiDeprecationWarnings._aws_cdk_aws_ecs_ContainerDefinition(_containerDefinition);
|
37 | }
|
38 | catch (error) {
|
39 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
40 | Error.captureStackTrace(error, this.bind);
|
41 | }
|
42 | throw error;
|
43 | }
|
44 | return {
|
45 | logDriver: 'fluentd',
|
46 | options: utils_1.stringifyOptions({
|
47 | 'fluentd-address': this.props.address,
|
48 | 'fluentd-async-connect': this.props.asyncConnect,
|
49 | 'fluentd-buffer-limit': this.props.bufferLimit,
|
50 | 'fluentd-retry-wait': this.props.retryWait && this.props.retryWait.toSeconds(),
|
51 | 'fluentd-max-retries': this.props.maxRetries,
|
52 | 'fluentd-sub-second-precision': this.props.subSecondPrecision,
|
53 | ...utils_1.renderCommonLogDriverOptions(this.props),
|
54 | }),
|
55 | };
|
56 | }
|
57 | }
|
58 | exports.FluentdLogDriver = FluentdLogDriver;
|
59 | _a = JSII_RTTI_SYMBOL_1;
|
60 | FluentdLogDriver[_a] = { fqn: "@aws-cdk/aws-ecs.FluentdLogDriver", version: "1.204.0" };
|
61 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmx1ZW50ZC1sb2ctZHJpdmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZmx1ZW50ZC1sb2ctZHJpdmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUdBLDZDQUEwRDtBQUMxRCxtQ0FBeUU7QUEwRHpFOztHQUVHO0FBQ0gsTUFBYSxnQkFBaUIsU0FBUSxzQkFBUztJQUM3Qzs7OztPQUlHO0lBQ0gsWUFBNkIsUUFBK0IsRUFBRTtRQUM1RCxLQUFLLEVBQUUsQ0FBQztRQURtQixVQUFLLEdBQUwsS0FBSyxDQUE0Qjs7Ozs7OytDQU5uRCxnQkFBZ0I7Ozs7S0FRMUI7SUFFRDs7T0FFRztJQUNJLElBQUksQ0FBQyxNQUFxQixFQUFFLG9CQUF5Qzs7Ozs7Ozs7OztRQUMxRSxPQUFPO1lBQ0wsU0FBUyxFQUFFLFNBQVM7WUFDcEIsT0FBTyxFQUFFLHdCQUFnQixDQUFDO2dCQUN4QixpQkFBaUIsRUFBRSxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU87Z0JBQ3JDLHVCQUF1QixFQUFFLElBQUksQ0FBQyxLQUFLLENBQUMsWUFBWTtnQkFDaEQsc0JBQXNCLEVBQUUsSUFBSSxDQUFDLEtBQUssQ0FBQyxXQUFXO2dCQUM5QyxvQkFBb0IsRUFBRSxJQUFJLENBQUMsS0FBSyxDQUFDLFNBQVMsSUFBSSxJQUFJLENBQUMsS0FBSyxDQUFDLFNBQVMsQ0FBQyxTQUFTLEVBQUU7Z0JBQz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