Commit 3f2ee9e
authored
refactor(ec2): pass log level to connect script (#6161)
## Problem
We want to only log file paths when in debug mode, but the connect
script has no way of determining this.
## Solution
- pass log level to connect script.
- use it to determine what to log.
Example logs:
```
2024/12/05 15:50:24 ==============================================================================
2024/12/05 15:50:24 LOG_LEVEL=3
2024/12/05 15:50:24 AWS_REGION=us-east-1
2024/12/05 15:50:24 SESSION_ID=...
2024/12/05 15:51:11 ==============================================================================
2024/12/05 15:51:11 LOG_LEVEL=1
2024/12/05 15:51:11 AWS_REGION=us-east-1
2024/12/05 15:51:11 SESSION_ID=...
2024/12/05 15:51:11 AWS_SSM_CLI=.../Amazon/sessionmanagerplugin/bin/session-manager-plugin
2024/12/05 15:51:11 LOG_FILE_LOCATION=/.../ec2.{instanceId}.log
2024/12/05 15:51:55 ==============================================================================
2024/12/05 15:51:55 LOG_LEVEL=2
2024/12/05 15:51:55 AWS_REGION=us-east-1
2024/12/05 15:51:55 SESSION_ID=default-uk9cv4h86y5rdbrzarlkj9opci
2024/12/05 15:51:56 AWS_SSM_CLI=../Amazon/sessionmanagerplugin/bin/session-manager-plugin
2024/12/05 15:51:56 LOG_FILE_LOCATION=/.../ec2.{instanceId}.log
```
---
- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.1 parent 11c35ae commit 3f2ee9e
File tree
4 files changed
+22
-8
lines changed- packages/core
- resources
- src
- awsService/ec2
4 files changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
49 | 48 | | |
| 49 | + | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
0 commit comments