Skip to content

Commit e8221f7

Browse files
authored
chore: add gh issue and pr templates (#164)
1 parent 33f9164 commit e8221f7

File tree

7 files changed

+156
-22
lines changed

7 files changed

+156
-22
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: 🐛 Bug report
3+
about: Something isn't working as expected 🤔.
4+
labels: bug, needs-triage
5+
---
6+
7+
## Describe the bug
8+
<!--- A clear and concise description of what the bug is -->
9+
10+
## Expected Behavior
11+
<!--- Tell us what should happen -->
12+
13+
## Current Behavior
14+
<!--- Tell us what happens instead of the expected behavior -->
15+
16+
<!--- Include full errors, uncaught exceptions, stack traces, and relevant logs -->
17+
<!--- To turn on SDK logging, follow instructions here: http://github.com/aws-sdk-kotlin/tree/main/docs/debugging.md -->
18+
<!--- If service responses are relevant, please include wirelogs (after removing any sensitive content!) -->
19+
20+
## Steps to Reproduce
21+
<!--- If possible, provide a self-contained, concise snippet of code that can be used to reproduce the issue -->
22+
<!--- For more complex issues provide a repo with the smallest sample that reproduces the bug -->
23+
<!--- Avoid including business logic or unrelated code, it makes diagnosis more difficult -->
24+
25+
## Possible Solution
26+
<!--- Not required, but suggest a fix/reason for the bug -->
27+
28+
## Context
29+
<!--- How has this issue affected you? What are you trying to accomplish? -->
30+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
31+
32+
## Your Environment
33+
<!--- Include as many relevant details about the environment where the bug was discovered -->
34+
* AWS Kotlin SDK version used:
35+
* Platform (JVM/JS/Native):
36+
* Operating System and version:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: 📕 Documentation Issue
3+
about: Report an issue in the API Reference documentation or Developer Guide
4+
labels: documentation, needs-triage
5+
---
6+
7+
<!--- Provide a general summary of the issue in the Title above -->
8+
9+
## Describe the issue
10+
<!--- A clear and concise description of the issue -->
11+
12+
## Links
13+
<!-- Include links to affected documentation page(s) -->
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: 💡 Feature Request
3+
about: Suggest an idea for this project
4+
labels: enhancement, needs-triage
5+
---
6+
7+
<!--- Provide a general summary of the issue in the Title above -->
8+
9+
<!-- Please keep this note for the community -->
10+
11+
### Community Note
12+
13+
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
14+
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
15+
* If you are interested in working on this issue, please leave a comment
16+
17+
<!-- Thank you for keeping this note for the community -->
18+
19+
20+
## Describe the Feature
21+
<!--- A clear and concise description of the feature you are proposing -->
22+
23+
## Is your Feature Request related to a problem?
24+
<!--- A description of the issue, e.g. It would be great if... -->
25+
26+
## Proposed Solution
27+
<!--- Not required, but suggest how to implement the addition or change -->
28+
29+
## Describe alternatives you've considered
30+
<!--- Any alternative solutions or features you've considered -->
31+
32+
## Additional Context
33+
<!--- How has the lack of this feaure affected you? What are you trying to accomplish? -->
34+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
35+
36+
37+
- [ ] I may be able to implement this feature request

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Issue \#
4+
<!--- If it fixes an open issue, please link to the issue here -->
5+
6+
## Description of changes
7+
<!--- Why is this change required? What problem does it solve? -->
8+
9+
10+
## Scope
11+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
12+
- [ ] Bug fix (non-breaking change which fixes an issue)
13+
- [ ] New feature (non-breaking change which adds functionality)
14+
15+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ reported the issue. Please try to include as much information as you can. Detail
2323
## Contributing via Pull Requests
2424
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
2525

26-
1. You are working against the latest source on the *master* branch.
26+
1. You are working against the latest source on the *main* branch.
2727
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
2828
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
2929

@@ -52,6 +52,6 @@ [email protected] with any additional questions or comments.
5252

5353
## Licensing
5454

55-
See the [LICENSE](https://github.com/aws-samples/aws-sdk-kotlin/blob/master/LICENSE) file for our project's licensing. We will ask you confirm the licensing of your contribution.
55+
See the [LICENSE](https://github.com/aws-samples/aws-sdk-kotlin/blob/main/LICENSE) file for our project's licensing. We will ask you confirm the licensing of your contribution.
5656

5757
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,4 @@ aws.protocols=-restJson1
115115
```
116116
### Debugging
117117

118-
#### Logging
119-
120-
##### JVM
121-
122-
For JVM targets, the Kotlin SDK uses the `slf4j` logger. The build configuration can be updated to enable log output.
123-
124-
While any `slf4j`-compatible log library may be used, here is an example to enable log output from the SDK in JVM
125-
programs:
126-
127-
```
128-
implementation("org.slf4j:slf4j-simple:1.7.30")
129-
```
130-
131-
To view low-level request and response log output and the time of the log entry, specify this as JVM parameters to the executing program:
132-
133-
```
134-
-Dorg.slf4j.simpleLogger.defaultLogLevel=TRACE -Dorg.slf4j.simpleLogger.showDateTime=true
135-
```
136-
137-
The log level can be adjusted up as needed to DEBUG, INFO, WARN, or ERROR. [See here](http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html) for all properties for the simple logger.
118+
See [Debugging](docs/debugging.md)

docs/debugging.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Debugging
2+
3+
## Logging
4+
5+
### JVM
6+
7+
For JVM targets, the Kotlin SDK uses the `slf4j` logger. The build configuration can be updated to enable log output.
8+
9+
While any `slf4j`-compatible log library may be used, here is an example to enable log output from the SDK in JVM
10+
programs:
11+
12+
```
13+
implementation("org.slf4j:slf4j-simple:1.7.30")
14+
```
15+
16+
To view low-level request and response log output and the time of the log entry, specify this as JVM parameters to the executing program:
17+
18+
```
19+
-Dorg.slf4j.simpleLogger.defaultLogLevel=TRACE -Dorg.slf4j.simpleLogger.showDateTime=true
20+
```
21+
22+
The log level can be adjusted up as needed to DEBUG, INFO, WARN, or ERROR. [See here](http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html) for all properties for the simple logger.
23+
24+
25+
#### CRT Logs
26+
27+
JVM system properties for CRT related logs
28+
29+
30+
| Property | Description |
31+
| ----------------------------| -----------------------------------------------------------------------------------------------------------------|
32+
| `aws.crt.log.level` | Specify log level `None`, `Fatal`, `Error`, `Warn`, `Info`, `Debug`, `Trace` |
33+
| `aws.crt.log.destination` | The destination to log to `None`, `Stdout`, `Stderr`, `File`. By default when level is not `None` stderr is used |
34+
| `aws.crt.log.filename` | Redirect logs to a file |
35+
36+
37+
## Error Metadata
38+
39+
The raw protocol response is usually available on exceptions if you need access to additional response details (headers, status code, etc).
40+
41+
42+
```kotlin
43+
try {
44+
...
45+
} catch(ex: AwsServiceException) {
46+
val httpResp = ex.sdkErrorMetadata.protocolResponse as? HttpResponse
47+
if (httpResp != null) {
48+
println(httpResp.headers)
49+
println(httpResp.body.readAll()?.decodeToString())
50+
}
51+
}
52+
```

0 commit comments

Comments
 (0)