Skip to content

Commit

Permalink
Merge pull request #243 from voxxit/master
Browse files Browse the repository at this point in the history
Send debug logs to stderr
  • Loading branch information
barnybug committed Sep 19, 2017
2 parents 2112bad + 970e7c4 commit dd73c2f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Or set the environment variables: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY
You can switch between different sets in the credentials file by passing
`--profile` to any command, or setting the environment variable `AWS_PROFILE`.
For example:
cli53 list --profile my_profile

cli53 list --profile my_profile

For more information, see: http://blogs.aws.amazon.com/security/post/Tx3D6U6WSFGOK2H/A-New-and-Standardized-Way-to-Manage-Credentials-in-the-AWS-SDKs

Expand Down Expand Up @@ -112,6 +112,10 @@ Export as a BIND zone file (for backup!):

$ cli53 export example.com

Export fully-qualified domain names (instead of just prefixes) to `stdout`, and send AWS debug logging to `stderr`:

$ cli53 export --full --debug example.com > example.com.txt 2> example.com.err.log

Create some weighted records:

$ cli53 rrcreate --identifier server1 --weight 10 example.com 'www A 192.168.0.1'
Expand All @@ -133,7 +137,7 @@ Create some geolocation records:

$ cli53 rrcreate -i Africa --continent-code AF example.com 'geo 300 IN A 127.0.0.1'
$ cli53 rrcreate -i California --country-code US --subdivision-code CA example.com 'geo 300 IN A 127.0.0.2'

Create a primary/secondary pair of health checked records:

$ cli53 rrcreate -i Primary --failover PRIMARY --health-check 2e668584-4352-4890-8ffe-6d3644702a1b example.com 'ha 300 IN A 127.0.0.1'
Expand Down
6 changes: 5 additions & 1 deletion internal/features/step_definitions.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ import (
)

func getService() *route53.Route53 {
config := aws.Config{}
config := aws.Config{
Logger: aws.LoggerFunc(func(args ...interface{}) {
fmt.Fprintln(os.Stderr, args...)
}),
}
// ensures throttled requests are retried
config.MaxRetries = aws.Int(100)
return route53.New(session.New(), &config)
Expand Down
3 changes: 3 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ func getConfig(c *cli.Context) (*aws.Config, error) {
config := aws.Config{
Endpoint: &endpoint,
Region: &region,
Logger: aws.LoggerFunc(func(args ...interface{}) {
fmt.Fprintln(os.Stderr, args...)
}),
}
if profile != "" {
config.Credentials = credentials.NewSharedCredentials("", profile)
Expand Down

0 comments on commit dd73c2f

Please sign in to comment.