Best way to log an event


#1

Hi Guys,
Love your work, I think we will host our own server using your server code for security reasons. But how can we give you attribution?
However what is the best way just to log an event with CodeRR just like a verbose info message in other logging frameworks.

Best Regards,
Alistair


#2

Hello,

codeRR isn’t designed to be able to send messages. However, if you have messages that indicates errors, you can just create your own exception and then sent it:

try
{
    throw new InvalidOperationException("This is the message");
}
catch (Exception ex)
{
    Err.Report(ex, new { ErrTags = "info" });
}

In the next version, you can filter the search result using tags. Thus you can get a list of all messages and the number of times that they have been triggered.

Do note, if you are using messages for diagnostics purposes, the cost of doing the above is too high (throwing exceptions). In that case I would look at the ErrorReportDTO and send that message directly Err.SendReport(dto).

For the Community Server, you can buy a support subscription. Email support with next business day response and a higher chance of getting features implemented.

Our OnPremise server is being released in April. Better team management, integration with TFS and Active Directory support.


#3

Great thanks heaps. I will use this.
Do note, if you are using messages for diagnostics purposes, the cost of
doing the above is too high (throwing exceptions). In that case I would
look at the ErrorReportDTO and send that message directly
Err.SendReport(dto).

However I was not able to get the creating the applications to work. Are
there any recent bug fixes for this?

I will see if I can get clients to use your OnPremise solution in the
future!!

Best Regards,
Alistair


#4

Which version are you using? What error do you get?


#5

the latest download, the .net version, is there a core version?


#6

No. Just a MVC5 version of the server.

Mind doing a skype session and show me your server configuration? It allows me to quickly see what’s wrong. My email+skype is jonas@coderrapp.com


#7

Thanks mate but I only see
ErrorReportDTO log = new ErrorReportDTO() // But ErrorReportDTO is private
Err.UploadReport(log);