Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 08, 2012 09:47 AM by krokonoster
Dec 05, 2012 10:13 AM|LINK
I did read
this article, but does not sounds like what I'm after (Rather have something I don't have to call everywhere in my code)
Someone know a proper article walking you trhough the process of logging api calls, etc preferably using log4net (since that allready in use in my project)
Dec 05, 2012 12:37 PM|LINK
Dec 05, 2012 12:41 PM|LINK
Thanks a lot for that. did not come up iin my searches.
Is there some documentation on what this one does?
Dec 05, 2012 04:12 PM|LINK
Dec 06, 2012 11:37 PM|LINK
Simple enough, thanks. Will implement.
Dec 06, 2012 11:57 PM|LINK
Works great, thanks.
public class AccessController : ApiController
private readonly ITraceWriter _traceWriter;
_traceWriter = GlobalConfiguration.Configuration.Services.GetTraceWriter();
public Boolean Ping()
_traceWriter.Info(Request, ControllerContext.ControllerDescriptor.ControllerType.FullName, "Site Pinged");
Allready have log4net configured in project (using S#arpLite)
Only issue now is SharpLite logging 100's of other things and my stuff in between.
Don't know much about log4net and will research, but if you got advice?
<appender name="LogToFile" type="log4net.Appender.FileAppender">
<file value="../../logs/xxxxx.Web.Api.log" />
<appendToFile value="false" />
<conversionPattern value="%d [%t] %-5l - %m%n%n" />
<!-- Value of priority may be ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF -->
<priority value="INFO" />
<appender-ref ref="LogToFile" />
once get it figured will store to db table of course.
Dec 07, 2012 11:51 AM|LINK
The reference is here:
Dec 07, 2012 01:50 PM|LINK
What are you trying to do exactly?
Dec 08, 2012 09:47 AM|LINK
Ok here's the plan:
My API get called by a Mobile App. Mobile App Developed by another company in another city. API by me. I have no way to "debug" the mobile app.
I got a "Sandbox" client for my API (static html / jquery).
Many times (like this morning again) I get a client having some issue. When I use the mobile app, I have the same issue, but when using my sandbox all is fine.
So the problem is I do not know what the mobile app have posted to my API.
Was hoping to log something like : Time | Controller | Action | Input | Output
This would allow me to see what de frak de bloody mobile app sent over so I can see where is the problem.
needless to say, but now we are not on good foot..the mobile guys and me with blames kept flying back and forth when issues arrise.
Not to mention weekends when none of them are available and I spent hours with a client hoping to get behind an issue.