Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A .NET driver for loggly.com
Branch: master
Pull request Compare This branch is even with EAAppFoundry:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
loggly-csharp.tests
loggly-csharp
references
.gitignore
README.textile
license.txt
loggly-csharp.sln
loggly.nuspec
package.cmd

README.textile

Loggly .NET Driver

This is a .NET driver for loggly.com.

Download the bits here: Loggly.zip

Logging Events

Create a new Logger with your input key:

var logger = new Logger(“my-long-key-that-i-got-when-setting-up-my-http-input”);

Use either a synchronous or asynchronous Log method.

To Log in a structured way that allows you to reliabily capture a Log Level and the Machine Name use:

logger.Log(StructuredLogLevel.debug, “machineName”, “Log Message”);

or for Async

logger.LogAsync(StructruedLogLevel.info, “machineName”, “Log Message”);

There are 5 different Log Levels available to you. They are:
info, debug, warn, error, fatal

If you want to log in plain text (esp if your Loggly input is already setup for text only), use the Log method:

logger.log(“This is my log message”);

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.

Facets

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

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

Next, create a facet with your domain:

var facet = new Facet(“mydomain”);

Finally, use the various GetDate, GetIp and @GetInput* methods.

Getting facts is always synchronous

Something went wrong with that request. Please try again.