This is a provider for Common.Logging Library (C#) for sending your log items to Sentry Raven log servers.
- Common.Logging
- Newtonsoft.Json
1.0
Just run command in Package Manager Console in Visual Studio
PM> Install-Package Common.Logging.Raven
- Right-click on
References
item of your project in Solution Explorer and click menu itemManage NuGet Packages...
- Find in the
Nuget official package source (Online)
packageCommon.Logging.Raven
and click install button.
...
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
...
<common>
<logging>
<factoryAdapter type="Common.Logging.Raven.RavenLoggingFactoryAdapter, Common.Logging.Raven">
<arg key="connectionString" value="{PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}:{PORT}/{PROJECT_ID}" />
<arg key="loggerName" value="Common.Logging.Raven.Test" />
</factoryAdapter>
</logging>
</common>
...
Where
- {PROTOCOL} -
http
,https
orudp
- {PUBLIC_KEY} and {SECRET_KEY} - your keys from server. See here.
- {HOST} - site of server. For example: www.example.com
- {PORT} - Number of port
- {PROJECT_ID} - Identity of your project on server
For example:
http://b70a31b3510c4cf793964a185cfe1fd0:b7d80b520139450f903720eb7991bf3d@example.com:1000/1
udp://b70a31b3510c4cf793964a185cfe1fd0:b7d80b520139450f903720eb7991bf3d@example.com:1000/23
ILog log = LogManager.GetCurrentClassLogger();
log.Error("Error text");