slf4net | Simple Logging Facade for .Net

 by   ef-labs C# Version: Current License: MIT

kandi X-RAY | slf4net Summary

kandi X-RAY | slf4net Summary

slf4net is a C# library typically used in Logging applications. slf4net has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Simple Logging Facade for .Net (slf4net).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              slf4net has a low active ecosystem.
              It has 56 star(s) with 17 fork(s). There are 14 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 1 have been closed. On average issues are closed in 4 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of slf4net is current.

            kandi-Quality Quality

              slf4net has 0 bugs and 0 code smells.

            kandi-Security Security

              slf4net has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              slf4net code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              slf4net is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              slf4net releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of slf4net
            Get all kandi verified functions for this library.

            slf4net Key Features

            No Key Features are available at this moment for slf4net.

            slf4net Examples and Code Snippets

            No Code Snippets are available at this moment for slf4net.

            Community Discussions

            QUESTION

            No logging with configuration made in code using latest version of slf4net (1.0.0)
            Asked 2020-Sep-04 at 11:58

            I'm using the slf4net.log4net nuget package to handle logging in a project. Because it must be possible for the loglevel to change at runtime, I made the configuration in code. The issue is that this code works fine in slf4net.log4net version 0.1.32.1 but when I upgrade it to version 1.0.0, the logfile is created, but the logs are not present on the logfile. I've created a dummy project to show this issue. I do not see how I can add a zip file here, so I'll just post the code here. It is a console app in net framework 4.7.2;

            ...

            ANSWER

            Answered 2020-Sep-04 at 11:58

            I've found a workaround for this. Maybe not the cleanest solution but it works. If anyone knows a cleaner solution please add it here.

            When looking at the slf4net.log4net code I found out that when it tries to configure log4net it uses xml files or config files, which is a nightmare if you want to set the loglevel at runtime. You can pass a customconfigurator as parameter of the Log4netLoggerFactory . This customconfigurator needs to implement IXmlConfigurator. The CustomConfigurator I've made accepts an IAppender and a loglevel (log4net.Core.Level). In the implementation of the Configure(ICollection(ILoggerRepository repository) method. I've set the root log level and Configured with the BasicConfigurator. The CustomConfigurator looks like this:

            Source https://stackoverflow.com/questions/63517288

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install slf4net

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/ef-labs/slf4net.git

          • CLI

            gh repo clone ef-labs/slf4net

          • sshUrl

            git@github.com:ef-labs/slf4net.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link