Closed troyfitzwater closed 9 months ago
If you are using .NET 7 C# here is a working example:
using Rollbar;
RollbarLocator.RollbarInstance.Configure(new RollbarLoggerConfig("token","environment")); RollbarLocator.RollbarInstance.Info("NET Loaded Success!); //Log message in Rollbar (Info Message)
To log an Exception in a try catch: try {
} catch (Exception ex) { RollbarLocator.RollbarInstance.Critical(ex); }
I am using .NET 7 C#. Just tried this code out and I'm still not seeing any events in the dashboard.
Tried setting up a new project and using the access token from that but still nothing.
Do you have a the repo you can share with me and I can have a look for you? Or if you can tell me the type of .NET project (solution) you created and we can create one and share it with you.
I've been trying to demo Rollbar using the .NET SDK and tried following the sample code used provided during setup for a .NET project.
When using this code in a .NET 7 project, I'm getting the following error:
I've tried running this with both the Rollbar and Rollbar.NetCore.AspNet nuget packages installed. I've also tried using the
RollbarLoggerConfig
class instead, which builds successfully, but I'm not seeing any items in my project dashboard.Any assistance would be appreciated. Please let me know if I can provide any additional information.
Thank you!