Skip to content

queueit/loggly-csharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loggly .NET Driver

This is a .NET driver for loggly.com VERSION 2. It is a fork from https://github.com/karlseguin/loggly-csharp which currently only provides support for version 1. Besides that this repository provides a cleaner API and better support for JSON logging.

Logging Events

Create a new Logger with your customer token:

var logger = new Logger("my-long-key-that-i-got-when-setting-up-customer-tokens");

Supports asynchronous logging of strings, json, pocos or collections of pocos.

Searching Events

First, setup the username/password you want to connect with:

LogglyConfiguration.Configure(c => c.AuthenticateWith("username", "password"));

Next, create a searcher with your domain:

var searcher = new Searcher("mydomain");

Finally, use the various Search methods.

Note that searching happens synchronously but entries are lazy-loaded when enumerating through the entries.

Integration Tests

To run the integration tests, you'll need to place a config.user file in the test's debug folder (assuming you are running tests in debug). The file should look something like:

<appSettings>
	<add key="IntegrationKey" value="YOUR KEY"></add>
	<add key="IntegrationAccount" value="YOUR ACCOUNT NAME (SUBDOMAIN)"></add>
	<add key="IntegrationUser" value="YOUR USERNAME"></add>
	<add key="IntegrationPassword" value="YOUR PASSWORD"></add>
</appSettings>

About

A .NET driver for loggly.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%