goto10hq / nlog.documentdb Goto Github PK
View Code? Open in Web Editor NEWNlog target: DocumentDB (CosmosDB)
License: MIT License
Nlog target: DocumentDB (CosmosDB)
License: MIT License
Hi,
We encountered an issue with threads slowly leaking while using this target synchronously. Our program would consistently deadlock at around 1000 threads, after a day or so.
We've prevented this issue by wrapping the target in an AsyncWrapper
. It seems to be working smoothly now.
Is this something you've encountered in your projects?
It might be worth adding a note to the README, in case someone else has this problem.
Here is the config XML (sensitive info removed) in case it's helpful:
<target xsi:type="DocumentDB"
endPoint="https://[...].documents.azure.com:443/"
authorizationKey="..."
database="..."
collection="logs"
application="CarrierGateway">
<layout type="JsonLayout">
<attribute name="application" layout="${application}" />
<attribute name="deploymentUrl" layout="${environment:WEBSITE_HOSTNAME}" />
<attribute name="date" layout="${date}" />
<attribute name="level" layout="[${level:format=Ordinal},"${level}"]" encode="false" />
<attribute name="message" layout="${message}" />
<attribute name="data" layout="${event-properties:item=jsonData}" encode="false" />
<attribute name="logger" layout="${logger}" />
<attribute name="exceptionType" layout="${exception:format=Type}" />
<attribute name="exception" layout="${exception:format=@:innerFormat=@}" encode="false" />
</layout>
</target>
<target name="main" type="DocumentDB" endPoint="Dynamic value" authorizationKey="Dynamic values">
Basically i want set the endPoint from appsettings/gdc but none of them working.``
My project is .net core 2.0 and when using nlog.documentDB to log, I keep getting the error:
Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Azure.Documents.Client, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
I am using Nlog.DocumentDBTarget v1.2.0
I would like to add my logger to my general assembly cache. I have an on-premise SharePoint application which uses NLog (although the server runs in Azure). I would like to log to CosmosDB rather than a text file, but I can't add the NLog.DocumentDB assembly to the GAC because it is not strongly named. The main NLog assembly is strongly named and runs in the GAC quite well (using .Net Framework 4.6). Would it be possible to add certificates and strongly name the assemblies?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.