Skip to content
.NET client for communicating with the elmah.io REST API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
samples
src/Elmah.Io.Client
test/Elmah.Io.Client.Test
.gitignore
Elmah.Io.Client.sln
LICENSE
README.md
Swagger-Generate.ps1
appveyor.yml

README.md

Elmah.Io.Client

Build status NuGet

Raw client for communicating with the elmah.io API.

Usage

To start logging, create a new instance of the ElmahioAPI class:

client = ElmahioAPI.Create(apiKey);

where apiKey is your API key found on your profile page at elmah.io.

Logging

Log messages either through the log method:

client.Messages.Log(logId, new Exception(), Severity.Error, "This is a bug");

or through one of the helpers:

client.Messages.Debug(logId, "A debug message");
client.Messages.Fatal(logId, exception, "This is a fatal bug");

Creating logs

Logs are containers for log messages. To create a new log for a new application, microservice or similar, use the Create method:

client.Logs.Create(new CreateLog("My log"));

Developing

Parts of this client is auto generated using AutoRest. AutoRest is a brilliant code generation tools by Microsoft, that takes swagger input and generates client libraries for a number of different programming languages (like C#).

To generate a client of the most recent code, execute the following in the root folder:

AutoRest.exe -Input https://api.elmah.io:443/swagger/docs/v3 -AddCredentials true -Namespace Elmah.Io.Client -OutputDirectory Elmah.Io.Client
You can’t perform that action at this time.