Log files contain ANSI colors when using `--foreground` flag
Closed this issue · 1 comments
dannycjones commented
Mountpoint for Amazon S3 version
mount-s3 1.9.1-unofficial+fda5103
AWS Region
eu-west-1
Describe the running environment
Running local build on macOS.
Mountpoint options
mount-s3 DOC-EXAMPLE-BUCKET ~/mnt/s3/ --log-directory . --foreground
What happened?
Mountpoint started correctly and started logging to a file. The contents of the log file contain ANSI color control sequences, which they shouldn't.
If used in background mode, logging correctly omits ANSI color control sequences.
Relevant log output
2024-10-03T09:57:54.487692Z INFO mountpoint_s3::cli: mount-s3 1.9.1-unofficial+fda5103
2024-10-03T09:57:54.487851Z DEBUG mountpoint_s3::cli: CliArgs { bucket_name: "DOC-EXAMPLE-BUCKET", mount_point: "/Users/djonesoa/mnt/s3/", prefix: None, region: None, endpoint_url: None, force_path_style: false, transfer_acceleration: false, dual_stack: false, requester_pays: false, bucket_type: None, no_sign_request: false, profile: None, read_only: false, storage_class: None, allow_delete: false, allow_overwrite: false, auto_unmount: false, allow_root: false, allow_other: false, maximum_throughput_gbps: None, max_threads: 16, part_size: 8388608, read_part_size: None, write_part_size: None, uid: None, gid: None, dir_mode: None, file_mode: None, foreground: true, expected_bucket_owner: None, log_directory: Some("."), log_metrics: false, debug: true, debug_crt: false, no_log: false, cache: None, metadata_ttl: None, max_cache_size: None, user_agent_prefix: None, sse: None, sse_kms_key_id: None, upload_checksums: None, bind: None }
2024-10-03T09:57:54.488117Z DEBUG mountpoint_s3_client::instance_info: EC2 instance info not retrieved: IMDS was disabled
2024-10-03T09:57:54.488229Z WARN mountpoint_s3::cli: failed to detect network throughput. Using 10 gbps as throughput. Use --maximum-throughput-gbps CLI flag to configure a target throughput appropriate for the instance. Detection failed due to: failed to get instance type: IMDS is disabled
2024-10-03T09:57:54.488252Z INFO mountpoint_s3::cli: target network throughput 10 Gbps
2024-10-03T09:57:54.488396Z DEBUG mountpoint_s3::cli: using default region us-east-1
2024-10-03T09:57:54.493677Z DEBUG list_objects{�[3mid�[0m�[2m=�[0m0 �[3mbucket�[0m�[2m=�[0m"DOC-EXAMPLE-BUCKET" �[3mcontinued�[0m�[2m=�[0mfalse �[3mdelimiter�[0m�[2m=�[0m"" �[3mmax_keys�[0m�[2m=�[0m"0" �[3mprefix�[0m�[2m=�[0m""}: mountpoint_s3_client::s3_crt_client::list_objects: new request
2024-10-03T09:57:56.583239Z DEBUG list_objects{�[3mid�[0m�[2m=�[0m0 �[3mbucket�[0m�[2m=�[0m"DOC-EXAMPLE-BUCKET" �[3mcontinued�[0m�[2m=�[0mfalse �[3mdelimiter�[0m�[2m=�[0m"" �[3mmax_keys�[0m�[2m=�[0m"0" �[3mprefix�[0m�[2m=�[0m""}: mountpoint_s3_client::s3_crt_client: S3 request failed request_type=Default crt_error=Some(Error(14343, "aws-c-s3: AWS_ERROR_S3_INVALID_RESPONSE_STATUS, Invalid response status from request")) http_status=301 range=None duration=2.089061625s ttfb=Some(88.4055ms) request_id=FRN7Y2C9PTMXNXTK
2024-10-03T09:57:56.583686Z DEBUG list_objects{�[3mid�[0m�[2m=�[0m0 �[3mbucket�[0m�[2m=�[0m"DOC-EXAMPLE-BUCKET" �[3mcontinued�[0m�[2m=�[0mfalse �[3mdelimiter�[0m�[2m=�[0m"" �[3mmax_keys�[0m�[2m=�[0m"0" �[3mprefix�[0m�[2m=�[0m""}: mountpoint_s3_client::s3_crt_client: duration=2.08975925s request_id=FRN7Y2C9PTMXNXTK error=ClientError(IncorrectRegion("eu-west-1")) meta request failed
dannycjones commented
It appears to only be reproducible on macOS, and only when using --foreground
in combination with --log-directory
.