Comments (8)
Hi @GSFAtArrow,
Good afternoon.
Thanks for opening the issue? Could you please share the below:
- What is the type of application (or the Visual Studio template used)? Is it .NET Framework Web API project?
- Is possible, please share the sample code solution (you may ZIP it and attach it to this issue) for faster troubleshotting. Also share the deployment/execution steps.
- How are you executing the application?
- Are you executing from Visual Studio debugger? OR
- Are you deploying to IIS and then executing the application?
- Where is the application deployed? If it on the standalone box or an EC2 instance?
- How are AWS credentials configured?
Kindly note that if configured in default profile and application is deployed in IIS, then the user account under which application is being executed is not same as the logged in user for most cases. - Could you enable the verbose logging using the below code and share the detailed logs:
Amazon.AWSConfigs.LoggingConfig.LogResponses = Amazon.ResponseLoggingOption.Always;
Amazon.AWSConfigs.LoggingConfig.LogTo = Amazon.LoggingOptions.SystemDiagnostics;
Amazon.AWSConfigs.AddTraceListener("Amazon", new System.Diagnostics.ConsoleTraceListener());
Thanks,
Ashish
from aws-logging-dotnet.
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
from aws-logging-dotnet.
Hi Ashish,
What is the type of application (or the Visual Studio template used)? Is it .NET Framework Web API project?
A .NET Framework 4 Web API application.
Is possible, please share the sample code solution (you may ZIP it and attach it to this issue) for faster troubleshotting.
Unfortunately not, the application is large and the code is under IP protection but I have added the CloudWatch logger code in the first message above.
Also share the deployment/execution steps. How are you executing the application?
The application is running in IIS on an EC2 instance.
How are AWS credentials configured?
The application runs under the context of an AWS Role which has an AWS Profile which has the required CloudWatch permissions. I see that the CloudWatch Log Streams get created so I know that some permissions are being applied. My first assumption was that the Log Streams are empty because the PutLogEvents permission was missing but on checking I see that it is present.
Could you enable the verbose logging using the below code and share the detailed logs:
I already did this and couldn't find anything useful from the logs. The log file is very large now but I will try to extract some of it and add it here.
Thanks.
from aws-logging-dotnet.
Hi Ashish,
log4netdiagnostics.txt
I have attached a small snippet from the log4netdiagnostics file. I couldn't find any error messages in here. This section appears to keep repeating.
from aws-logging-dotnet.
Hi Ashish,
What is the type of application (or the Visual Studio template used)? Is it .NET Framework Web API project?
A .NET Framework 4 Web API application.
Is possible, please share the sample code solution (you may ZIP it and attach it to this issue) for faster troubleshotting.
Unfortunately not, the application is large and the code is under IP protection but I have added the CloudWatch logger code in the first message above.
Also share the deployment/execution steps. How are you executing the application?
The application is running in IIS on an EC2 instance.
How are AWS credentials configured?
The application runs under the context of an AWS Role which has an AWS Profile which has the required CloudWatch permissions. I see that the CloudWatch Log Streams get created so I know that some permissions are being applied. My first assumption was that the Log Streams are empty because the PutLogEvents permission was missing but on checking I see that it is present.
Could you enable the verbose logging using the below code and share the detailed logs:
I already did this and couldn't find anything useful from the logs. The log file is very large now but I will try to extract some of it and add it here.
Thanks.
@GSFAtArrow The logs shared by you are not verbose logs emitted by AWS SDK for .NET. Since you are using .NET Framework 4
application, you may try following steps at Logging with the AWS SDK for .NET to enable verbose logging. Depending on the options you enable, it should either write to log file you specify and/or SystemDiagnostics.
Also, if it is your test EC2 instance, you may also try using network monitoring tools (e.g. Fiddler) to examine why requests to put log events to CloudWatch logs are failing. Kindly note that it might take a while for logs to appear in CloudWatch logs, so kindly recheck if logs are still missing.
Also, just curious, have you somehow configured credentials at other location(s) mentioned in Credential and profile resolution? Notice that Amazon EC2 instance metadata is resolved last. Also, an application in IIS runs under a different account by default, hence EC2 instance metadata credentials are the way to go (which you are already using).
Thanks,
Ashish
from aws-logging-dotnet.
Hi Ashish,
Thanks for the reply. You wrote:-
Since you are using .NET Framework 4 application, you may try following steps at Logging with the AWS SDK for .NET to enable verbose logging
Apologies, I read through the link and can't find any mention of how to enable verbose logging for System.Diagnostics. Here is what our web.config section is:-
What should I change here to enable verbose logging?
Thanks.
from aws-logging-dotnet.
Hi Ashish,
Thanks for the reply. You wrote:-
Since you are using .NET Framework 4 application, you may try following steps at Logging with the AWS SDK for .NET to enable verbose logging
Apologies, I read through the link and can't find any mention of how to enable verbose logging for System.Diagnostics. Here is what our web.config section is:-
What should I change here to enable verbose logging?
Thanks.
@GSFAtArrow My apologies if this was unclear. Also refer Allowed Elements
in Configuration Files Reference for AWS SDK for .NET (only applies to .NET Framework). For logging
section, you could select set logResponses="Always"
. This would enable verbose logging.
Thanks,
Ashish
from aws-logging-dotnet.
This issue has not received a response in 5 days. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
from aws-logging-dotnet.
Related Issues (20)
- Error AWSTarget CloudWatch Network Error Using Nlog HOT 2
- InputLogEvent uses local time instead of UTC HOT 3
- Fix messages getting lost. HOT 5
- Nlog to aws cloudwatch not working when passing lookup values HOT 4
- LogStreamName is not configurable HOT 11
- Cannot reopen bugs HOT 2
- AWS logger logs to cloudwatch twice HOT 4
- Exception caught when writing error log to fileSystem.IO.IOException: Read-only file system : '/var/task/aws-logger-errors.txt' HOT 1
- Using AWS.Logger.SeriLog in Lambda Web API throws "Endpoint request timed out" HOT 13
- LogStreamNamePrefix does not log and idles with AWS.Logger.Log4net HOT 3
- Provide mechanism to flush background queue of log messages
- Not compatible with latest log4net HOT 3
- ASP.NET Core Logging needs Profile property under Logging HOT 7
- Support Serilog 3.0.0 HOT 2
- Support NLog 5.x HOT 1
- AWSSDK Logger cannot fetch credentials from instance profile after upgrading to AWSSDK.Core 3.7.x HOT 10
- Output errors to Serilog.SelfLog for exceptions HOT 1
- Upgraded Nuget now web app hangs HOT 14
- AWSLoggerConfig should expose AmazonCloudWatchLogsConfig.AuthenticationRegion HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-logging-dotnet.