Skip to content

Commit 2b7d161

Browse files
Exclude the ansi feature of tracing-subscriber instead of calling .with_ansi(false) in the builder (awslabs#674)
* Disable the ansi feature for tracing_subscriber instead of building with_ansi(false) * use tracing::Level::INFO instead of via tracing-subscriber in README
1 parent a00fe5d commit 2b7d161

File tree

63 files changed

+34
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+34
-145
lines changed

examples/advanced-sqs-partial-batch-failures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ lambda_runtime = { path = "../../lambda-runtime" }
1313
tokio = { version = "1", features = ["macros"] }
1414
futures = "0.3"
1515
tracing = { version = "0.1", features = ["log"] }
16-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
16+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }

examples/advanced-sqs-partial-batch-failures/src/main.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ async fn main() -> Result<(), Error> {
3333
.with_max_level(tracing::Level::INFO)
3434
// disable printing the name of the module in every log line.
3535
.with_target(false)
36-
// this needs to be set to false, otherwise ANSI color codes will
37-
// show up in a confusing manner in CloudWatch logs.
38-
.with_ansi(false)
3936
// disabling time is handy because CloudWatch will add the ingestion time.
4037
.without_time()
4138
.init();
@@ -78,9 +75,7 @@ where
7875
tracing::trace!("Handling batch size {}", event.payload.records.len());
7976
let create_task = |msg| {
8077
// We need to keep the message_id to report failures to SQS
81-
let SqsMessageObj {
82-
message_id, body, ..
83-
} = msg;
78+
let SqsMessageObj { message_id, body, .. } = msg;
8479
let span = tracing::span!(tracing::Level::INFO, "Handling SQS msg", message_id);
8580
let task = async {
8681
//TODO catch panics like the `run` function from lambda_runtime
@@ -104,9 +99,7 @@ where
10499
}
105100
},
106101
)
107-
.map(|id| BatchItemFailure {
108-
item_identifier: id,
109-
})
102+
.map(|id| BatchItemFailure { item_identifier: id })
110103
.collect();
111104

112105
Ok(SqsBatchResponse {

examples/basic-error-handling/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ serde_json = "1.0.81"
1717
simple-error = "0.2.3"
1818
tokio = { version = "1", features = ["macros"] }
1919
tracing = { version = "0.1", features = ["log"] }
20-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
20+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
2121

2222

examples/basic-error-handling/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ async fn main() -> Result<(), Error> {
5454
.with_max_level(tracing::Level::INFO)
5555
// disable printing the name of the module in every log line.
5656
.with_target(false)
57-
// this needs to be set to false, otherwise ANSI color codes will
58-
// show up in a confusing manner in CloudWatch logs.
59-
.with_ansi(false)
6057
// disabling time is handy because CloudWatch will add the ingestion time.
6158
.without_time()
6259
.init();

examples/basic-lambda-external-runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ serde = "1.0.163"
1212
tokio = "1.28.2"
1313
tokio-test = "0.4.2"
1414
tracing = "0.1.37"
15-
tracing-subscriber = "0.3.17"
15+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }

examples/basic-lambda-external-runtime/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ fn main() -> Result<(), io::Error> {
2929
.with_max_level(tracing::Level::INFO)
3030
// disable printing the name of the module in every log line.
3131
.with_target(false)
32-
// this needs to be set to false, otherwise ANSI color codes will
33-
// show up in a confusing manner in CloudWatch logs.
34-
.with_ansi(false)
3532
// disabling time is handy because CloudWatch will add the ingestion time.
3633
.without_time()
3734
.init();

examples/basic-lambda/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ lambda_runtime = { path = "../../lambda-runtime" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919
tokio-test = "0.4.2"

examples/basic-lambda/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ async fn main() -> Result<(), Error> {
2929
.with_max_level(tracing::Level::INFO)
3030
// disable printing the name of the module in every log line.
3131
.with_target(false)
32-
// this needs to be set to false, otherwise ANSI color codes will
33-
// show up in a confusing manner in CloudWatch logs.
34-
.with_ansi(false)
3532
// disabling time is handy because CloudWatch will add the ingestion time.
3633
.without_time()
3734
.init();

examples/basic-s3-object-lambda-thumbnail/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ lambda_runtime = { path = "../../lambda-runtime" }
2020
serde = "1"
2121
tokio = { version = "1", features = ["macros"] }
2222
tracing = { version = "0.1" }
23-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
23+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
2424
aws-config = "0.55.3"
2525
aws-sdk-s3 = "0.28.0"
2626
thumbnailer = "0.4.0"

examples/basic-s3-object-lambda-thumbnail/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ async fn main() -> Result<(), Error> {
6969
.with_max_level(tracing::Level::TRACE)
7070
// disable printing the name of the module in every log line.
7171
.with_target(false)
72-
// this needs to be set to false, otherwise ANSI color codes will
73-
// show up in a confusing manner in CloudWatch logs.
74-
.with_ansi(false)
7572
// disabling time is handy because CloudWatch will add the ingestion time.
7673
.without_time()
7774
.init();

examples/basic-s3-thumbnail/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ lambda_runtime = { path = "../../lambda-runtime" }
2020
serde = "1"
2121
tokio = { version = "1", features = ["macros"] }
2222
tracing = { version = "0.1" }
23-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
23+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
2424
aws-config = "0.54.1"
2525
aws-sdk-s3 = "0.24.0"
2626
thumbnailer = "0.4.0"

examples/basic-s3-thumbnail/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ async fn main() -> Result<(), Error> {
111111
.with_max_level(tracing::Level::INFO)
112112
// disable printing the name of the module in every log line.
113113
.with_target(false)
114-
// this needs to be set to false, otherwise ANSI color codes will
115-
// show up in a confusing manner in CloudWatch logs.
116-
.with_ansi(false)
117114
// disabling time is handy because CloudWatch will add the ingestion time.
118115
.without_time()
119116
.init();

examples/basic-sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lambda_runtime = { path = "../../lambda-runtime" }
1313
serde = "1.0.136"
1414
tokio = { version = "1", features = ["macros"] }
1515
tracing = { version = "0.1", features = ["log"] }
16-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
16+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1717

1818
[dev-dependencies]
1919
mockall = "0.11.3"

examples/basic-sdk/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ async fn main() -> Result<(), Error> {
3838
.with_max_level(tracing::Level::INFO)
3939
// disable printing the name of the module in every log line.
4040
.with_target(false)
41-
// this needs to be set to false, otherwise ANSI color codes will
42-
// show up in a confusing manner in CloudWatch logs.
43-
.with_ansi(false)
4441
// disabling time is handy because CloudWatch will add the ingestion time.
4542
.without_time()
4643
.init();

examples/basic-shared-resource/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ lambda_runtime = { path = "../../lambda-runtime" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
19-
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
2019

examples/basic-shared-resource/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ async fn main() -> Result<(), Error> {
4949
.with_max_level(tracing::Level::INFO)
5050
// disable printing the name of the module in every log line.
5151
.with_target(false)
52-
// this needs to be set to false, otherwise ANSI color codes will
53-
// show up in a confusing manner in CloudWatch logs.
54-
.with_ansi(false)
5552
// disabling time is handy because CloudWatch will add the ingestion time.
5653
.without_time()
5754
.init();

examples/basic-sqs/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ lambda_runtime = { path = "../../lambda-runtime" }
2020
serde = "1.0.136"
2121
tokio = { version = "1", features = ["macros"] }
2222
tracing = { version = "0.1", features = ["log"] }
23-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
23+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }

examples/basic-sqs/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ async fn main() -> Result<(), Error> {
2525
.with_max_level(tracing::Level::INFO)
2626
// disable printing the name of the module in every log line.
2727
.with_target(false)
28-
// this needs to be set to false, otherwise ANSI color codes will
29-
// show up in a confusing manner in CloudWatch logs.
30-
.with_ansi(false)
3128
// disabling time is handy because CloudWatch will add the ingestion time.
3229
.without_time()
3330
.init();

examples/basic-streaming-response/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ hyper = { version = "0.14", features = [
1414
lambda_runtime = { path = "../../lambda-runtime" }
1515
tokio = { version = "1", features = ["macros"] }
1616
tracing = { version = "0.1", features = ["log"] }
17-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
17+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1818
serde_json = "1.0"

examples/basic-streaming-response/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ async fn main() -> Result<(), Error> {
3030
.with_max_level(tracing::Level::INFO)
3131
// disable printing the name of the module in every log line.
3232
.with_target(false)
33-
// this needs to be set to false, otherwise ANSI color codes will
34-
// show up in a confusing manner in CloudWatch logs.
35-
.with_ansi(false)
3633
// disabling time is handy because CloudWatch will add the ingestion time.
3734
.without_time()
3835
.init();

examples/extension-basic/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda-extension = { path = "../../lambda-extension" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/extension-basic/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ async fn main() -> Result<(), Error> {
1919
.with_max_level(tracing::Level::INFO)
2020
// disable printing the name of the module in every log line.
2121
.with_target(false)
22-
// this needs to be set to false, otherwise ANSI color codes will
23-
// show up in a confusing manner in CloudWatch logs.
24-
.with_ansi(false)
2522
// disabling time is handy because CloudWatch will add the ingestion time.
2623
.without_time()
2724
.init();

examples/extension-combined/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda-extension = { path = "../../lambda-extension" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/extension-combined/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ async fn main() -> Result<(), Error> {
3434
.with_max_level(tracing::Level::INFO)
3535
// disable printing the name of the module in every log line.
3636
.with_target(false)
37-
// this needs to be set to false, otherwise ANSI color codes will
38-
// show up in a confusing manner in CloudWatch logs.
39-
.with_ansi(false)
4037
// disabling time is handy because CloudWatch will add the ingestion time.
4138
.without_time()
4239
.init();

examples/extension-custom-events/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda-extension = { path = "../../lambda-extension" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/extension-custom-events/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ async fn main() -> Result<(), Error> {
2121
.with_max_level(tracing::Level::INFO)
2222
// disable printing the name of the module in every log line.
2323
.with_target(false)
24-
// this needs to be set to false, otherwise ANSI color codes will
25-
// show up in a confusing manner in CloudWatch logs.
26-
.with_ansi(false)
2724
// disabling time is handy because CloudWatch will add the ingestion time.
2825
.without_time()
2926
.init();

examples/extension-custom-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda-extension = { path = "../../lambda-extension" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/extension-custom-service/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ async fn main() -> Result<(), Error> {
3838
.with_max_level(tracing::Level::INFO)
3939
// disable printing the name of the module in every log line.
4040
.with_target(false)
41-
// this needs to be set to false, otherwise ANSI color codes will
42-
// show up in a confusing manner in CloudWatch logs.
43-
.with_ansi(false)
4441
// disabling time is handy because CloudWatch will add the ingestion time.
4542
.without_time()
4643
.init();

examples/extension-logs-basic/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda-extension = { path = "../../lambda-extension" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros", "rt"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/extension-logs-basic/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ async fn main() -> Result<(), Error> {
2020
.with_max_level(tracing::Level::INFO)
2121
// disable printing the name of the module in every log line.
2222
.with_target(false)
23-
// this needs to be set to false, otherwise ANSI color codes will
24-
// show up in a confusing manner in CloudWatch logs.
25-
.with_ansi(false)
2623
// disabling time is handy because CloudWatch will add the ingestion time.
2724
.without_time()
2825
.init();

examples/extension-logs-custom-service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda-extension = { path = "../../lambda-extension" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/extension-logs-custom-service/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ async fn main() -> Result<(), Error> {
6161
.with_max_level(tracing::Level::INFO)
6262
// disable printing the name of the module in every log line.
6363
.with_target(false)
64-
// this needs to be set to false, otherwise ANSI color codes will
65-
// show up in a confusing manner in CloudWatch logs.
66-
.with_ansi(false)
6764
// disabling time is handy because CloudWatch will add the ingestion time.
6865
.without_time()
6966
.init();

examples/extension-logs-kinesis-firehose/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ edition = "2021"
1313
lambda-extension = { path = "../../lambda-extension" }
1414
tokio = { version = "1.17.0", features = ["full"] }
1515
tracing = { version = "0.1", features = ["log"] }
16-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
16+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1717
aws-config = "0.13.0"
1818
aws-sdk-firehose = "0.13.0"
1919

examples/extension-logs-kinesis-firehose/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ async fn main() -> Result<(), Error> {
5858
.with_max_level(tracing::Level::INFO)
5959
// disable printing the name of the module in every log line.
6060
.with_target(false)
61-
// this needs to be set to false, otherwise ANSI color codes will
62-
// show up in a confusing manner in CloudWatch logs.
63-
.with_ansi(false)
6461
// disabling time is handy because CloudWatch will add the ingestion time.
6562
.without_time()
6663
.init();

examples/extension-telemetry-basic/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda-extension = { path = "../../lambda-extension" }
1515
serde = "1.0.136"
1616
tokio = { version = "1", features = ["macros", "rt"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/extension-telemetry-basic/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ async fn main() -> Result<(), Error> {
4545
.with_max_level(tracing::Level::INFO)
4646
// disable printing the name of the module in every log line.
4747
.with_target(false)
48-
// this needs to be set to false, otherwise ANSI color codes will
49-
// show up in a confusing manner in CloudWatch logs.
50-
.with_ansi(false)
5148
// disabling time is handy because CloudWatch will add the ingestion time.
5249
.without_time()
5350
.init();

examples/http-axum-diesel/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ lambda_runtime = { path = "../../lambda-runtime" }
2020
serde = "1.0.159"
2121
tokio = { version = "1", features = ["macros"] }
2222
tracing = { version = "0.1", features = ["log"] }
23-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
23+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }

examples/http-axum-diesel/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ async fn main() -> Result<(), Error> {
9797
.with_max_level(tracing::Level::INFO)
9898
// disable printing the name of the module in every log line.
9999
.with_target(false)
100-
// this needs to be set to false, otherwise ANSI color codes will
101-
// show up in a confusing manner in CloudWatch logs.
102-
.with_ansi(false)
103100
// disabling time is handy because CloudWatch will add the ingestion time.
104101
.without_time()
105102
.init();

examples/http-axum/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ lambda_http = { path = "../../lambda-http" }
1515
lambda_runtime = { path = "../../lambda-runtime" }
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020
axum = "0.6.4"
2121
serde_json = "1.0"

examples/http-axum/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ async fn main() -> Result<(), Error> {
4242
.with_max_level(tracing::Level::INFO)
4343
// disable printing the name of the module in every log line.
4444
.with_target(false)
45-
// this needs to be set to false, otherwise ANSI color codes will
46-
// show up in a confusing manner in CloudWatch logs.
47-
.with_ansi(false)
4845
// disabling time is handy because CloudWatch will add the ingestion time.
4946
.without_time()
5047
.init();

examples/http-basic-lambda/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ lambda_http = { path = "../../lambda-http" }
1515
lambda_runtime = { path = "../../lambda-runtime" }
1616
tokio = { version = "1", features = ["macros"] }
1717
tracing = { version = "0.1", features = ["log"] }
18-
tracing-subscriber = { version = "0.3", default-features = false, features = ["ansi", "fmt"] }
18+
tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt"] }
1919

2020

examples/http-basic-lambda/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ async fn main() -> Result<(), Error> {
2424
.with_max_level(tracing::Level::INFO)
2525
// disable printing the name of the module in every log line.
2626
.with_target(false)
27-
// this needs to be set to false, otherwise ANSI color codes will
28-
// show up in a confusing manner in CloudWatch logs.
29-
.with_ansi(false)
3027
// disabling time is handy because CloudWatch will add the ingestion time.
3128
.without_time()
3229
.init();

0 commit comments

Comments
 (0)