j256 / cloudwatch-logback-appender

Appender that publishes logback log entries to AWS CloudWatch
ISC License
56 stars 37 forks source link

Support Non-EC2 Launch? #39

Open tosehee opened 3 years ago

tosehee commented 3 years ago

If I am using this at my local machine, and I get this following error.

com.amazonaws.SdkClientException: Failed to connect to service endpoint: at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:100) at com.amazonaws.internal.EC2ResourceFetcher.doReadResource(EC2ResourceFetcher.java:70) at com.amazonaws.internal.InstanceMetadataServiceResourceFetcher.readResource(InstanceMetadataServiceResourceFetcher.java:75) at com.amazonaws.internal.EC2ResourceFetcher.readResource(EC2ResourceFetcher.java:66) at com.amazonaws.util.EC2MetadataUtils.getItems(EC2MetadataUtils.java:403) at com.amazonaws.util.EC2MetadataUtils.getData(EC2MetadataUtils.java:372) at com.amazonaws.util.EC2MetadataUtils.getData(EC2MetadataUtils.java:368) at com.amazonaws.util.EC2MetadataUtils.fetchData(EC2MetadataUtils.java:422) at com.amazonaws.util.EC2MetadataUtils.fetchData(EC2MetadataUtils.java:416) at com.amazonaws.util.EC2MetadataUtils.getInstanceId(EC2MetadataUtils.java:136) at com.j256.cloudwatchlogbackappender.CloudWatchAppender$CloudWatchWriter.lookupInstanceName(CloudWatchAppender.java:712) at com.j256.cloudwatchlogbackappender.CloudWatchAppender$CloudWatchWriter.createLogsClient(CloudWatchAppender.java:622) at com.j256.cloudwatchlogbackappender.CloudWatchAppender$CloudWatchWriter.writeEvents(CloudWatchAppender.java:534) at com.j256.cloudwatchlogbackappender.CloudWatchAppender$CloudWatchWriter.run(CloudWatchAppender.java:497) at java.lang.Thread.run(Thread.java:748)

Can you make it so the "addr" can use the local IP ?

tosehee commented 3 years ago

Hello?

BigBallard commented 3 years ago

I support @tosehee in this request. It really should be a no-brainer for local development. I would rather not fork this to get this feature in.