Giter VIP home page Giter VIP logo

nlog.documentdb's People

Contributors

frohikey avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

nlog.documentdb's Issues

Thread leaking with synchronous logging

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},&quot;${level}&quot;]" 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>

Could not load file or assembly 'Microsoft.Azure.Documents.Client, Version=2.1.0.0

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

Request -- Strongly name the assembly

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.