custom-logger | simple , customizable logger for node

 by   felixmc JavaScript Version: 0.3.1 License: MIT

kandi X-RAY | custom-logger Summary

kandi X-RAY | custom-logger Summary

custom-logger is a JavaScript library typically used in Logging, Nodejs applications. custom-logger has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i custom-logger' or download it from GitHub, npm.

simple, customizable logger for node
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              custom-logger has a low active ecosystem.
              It has 10 star(s) with 7 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 2 open issues and 3 have been closed. On average issues are closed in 3 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of custom-logger is 0.3.1

            kandi-Quality Quality

              custom-logger has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              custom-logger 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

              custom-logger releases are available to install and integrate.
              Deployable package is available in npm.
              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 custom-logger
            Get all kandi verified functions for this library.

            custom-logger Key Features

            No Key Features are available at this moment for custom-logger.

            custom-logger Examples and Code Snippets

            No Code Snippets are available at this moment for custom-logger.

            Community Discussions

            QUESTION

            log4j2 + programmatically override a parent custom ConfigurationFactory in a web app
            Asked 2020-Dec-09 at 16:17

            We are trying something new and posting the question here to see if it is possible.

            TL;DR Overriding a parent custom ConfigurationFactory in a web app.

            Scenario: We have bunch of web applications. Some of those web applications write the logs to same log file and other web applications to application related individual log files. So I have written a CustomLoggerConfigFactory (let's call this as parent configuration for the sake of discussion) and bundled that up in a custom-logger-util.jar and using this jar as a dependency in the web applications and the logger is getting initialized during web app startup. This configuration has a RollingFileAppender after initialized writes the logs to a file named: common-logs.log which is working fine. Here below is the code for CustomLoggerConfigFactory.

            Problem: Now my question is, say in a web application B, also where the common-logger-util.jar is used as a dependency - how can I extend the CustomLoggerConfigFactory to override the RollingFileAppender to write the logs to appB.log file instead of common-logs.log programmatically and without using config files and keeping the rest of the configuration the same i.e. to use the Console appender, Loggers(including RootLogger) as defined by parent config factory? Can anyone please explain how to achieve this?

            Thanks in advance.

            ...

            ANSWER

            Answered 2020-Dec-09 at 16:17

            I have designed my custom config factory and see that as one way to accomplish this.

            Here below is the solution.

            The solution is built on Java 8. The interfaces in Java 8 now allow you to define default implementation for the methods and used them. The log4j2 provided ConfigurationFactory is already an abstract class but I wanted to separate the creation of configuration and to the individual components having the default implementation.

            The LoggerConfigFactory in the below image is the custom default implementation that can be used in any of the other apps just by including it (however, in my case, I packaged CustomConfigBuilder, LoggerConfigFactory and LoggerConstants in a jar file).

            In the event in the application if any or all of the individual components needs to be defined, all it is required is to create config factory class (AppSpecificLoggerConfigFactory) that extends the default LoggerConfigFactory.

            This worked!! Here below is the code for the sake of reference.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install custom-logger

            You can install using 'npm i custom-logger' or download it from GitHub, npm.

            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
            Install
          • npm

            npm i custom-logger

          • CLONE
          • HTTPS

            https://github.com/felixmc/custom-logger.git

          • CLI

            gh repo clone felixmc/custom-logger

          • sshUrl

            git@github.com:felixmc/custom-logger.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