tinylog | lightweight C C++ logging library developed for Linux

 by   pymumu C Version: v1.7 License: Non-SPDX

kandi X-RAY | tinylog Summary

kandi X-RAY | tinylog Summary

tinylog is a C library typically used in Logging applications. tinylog has no bugs, it has no vulnerabilities and it has low support. However tinylog has a Non-SPDX License. You can download it from GitHub.

int tlog_init(const char *logfile, int maxlogsize, int maxlogcount, int buffsize, unsigned int flag); Function:Initialize log module logfile: log file maxlogsize: The maximum size of a single log file. maxlogcount: Number of archived logs. buffsize: Buffer size flag: log output flag: List of flags are as follows. Function:Print log level: Current log Levels format: Log formats. tlog_debug, tlog_info, tlog_notice, tlog_warn, tlog_error, tlog_fatal. Function:Print log, for c++ use << output log. format: Log formats. Function:Registers a custom Format function, and the callback function is defined as:tlog_format_func. tlog_reg_log_output_func(tlog_log_output_func output, void *private) Function: Register the custom log output function. The callback function is defined as: tlog_log_output_func. The TLOG_SEGMENT flag can be set during log initialization to return the callback to an independent full log. Function:Set log level,valid level are :TLOG_DEBUG, TLOG_INFO, TLOG_NOTICE, TLOG_WARN, TLOG_ERROR, TLOG_FATAL. Function:Update log file. logfile: log file. Function:set whether the log is output to screen. tlog_open(const char *logfile, int maxlogsize, int maxlogcount, int buffsize, unsigned int flag). Function: Initializes a new log stream. When finished, it is closed with tlog_cloese. logfile: log file. maxlogsize: The maximum size of a single log file. maxlogcount: The number of archived logs. buffsize: The size of the buffer. flag: log output flag: List of flags are as follows. Function: Turn off the log stream log: The log stream handle. tlog_printf(tlog_log *log, const char *format, ...). Function: Print the log to the specified log stream log: The log stream handle. format: The log format. Function: Print the log to the specified log stream, use << output log like std::out log: The log stream handle. tlog_vprintf(tlog_log *log, const char *format, va_list ap). Function: Print the log to the specified log stream log: The log stream handle. format: The log format. ap: List of parameters. tlog_logscreen(tlog_log *log, int enable). Function: Set whether the log stream is output to the screen log: The log stream handle. enable: Whether to enable. Function: Get local time. tm: Local time output. tlog_reg_output_func(tlog_log *log, tlog_output_func output). Function: Register the log stream output callback function. After the specified, the built-in write local file interface will be invalid. The TLOG_SEGMENT flag can be set when the log stream is initialized to return the callback to an independent complete log. tlog_set_private(tlog_log *log, void *private). Function: Set private parameters for retrieval in the callback function. log: The log stream handle. private: private parameter. Function: Get the private parameter, which is obtained from the callback function. log: The log stream handle. return value: private parameter. tlog_rename_logfile(tlog_log *log, const char *logfile). Function: Rename log file. log: The log stream handle. logfile: log file.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              tinylog has a low active ecosystem.
              It has 161 star(s) with 53 fork(s). There are 8 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 4 open issues and 4 have been closed. On average issues are closed in 63 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of tinylog is v1.7

            kandi-Quality Quality

              tinylog has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              tinylog has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              tinylog releases are available to install and integrate.
              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 tinylog
            Get all kandi verified functions for this library.

            tinylog Key Features

            No Key Features are available at this moment for tinylog.

            tinylog Examples and Code Snippets

            No Code Snippets are available at this moment for tinylog.

            Community Discussions

            QUESTION

            Tinylog Android, is it possible to clear the file?
            Asked 2022-Mar-05 at 20:08

            I'm using the Tinylog library with the "rolling file" function to write logs to a file. Sometimes I need to clear a file.

            Tried to do it with normal Java methods but it breaks the file and makes it hard to read. Is there a way to clear the log file at any point so it doesn't break?

            ...

            ANSWER

            Answered 2022-Mar-05 at 20:08

            You can use standard policies for starting new log files at defined events. This is the recommended way.

            If you need more flexibility, you can use the DynamicPolicy for starting a new log file programmatically. This policy is part of tinylog 2.5. The first milestone is expected to be released during this month and will include this new policy.

            Configuration:

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

            QUESTION

            In graalvm, how to load tinylog.properties with native-image?
            Asked 2022-Feb-16 at 10:58

            I use graalvm to build a jar with tinylog and work very good! But when I use native-image build a exe,tinylog only work with default setting. what can I do let tinylog can load my tinylog.properties with native-image? please~ thanks!

            ...

            ANSWER

            Answered 2022-Feb-16 at 05:47

            On GitHub, you can find a minimal example project for using tinylog 2 in a native image build: https://github.com/tinylog-org/tinylog-graal-example

            You need a custom Gradle task for generating the configuration for the native image (see tinylog-graal-example/blob/v2/build.gradle).

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

            QUESTION

            How to use or where to place TinyLog properties file with Maven InteliJ
            Asked 2021-May-05 at 13:57

            According to the TinyLog website

            The properties file should be named "tinylog.properties" and placed in the default package. In common IDEs like Eclipse and Netbeans, it is sufficient to put "tinylog.properties" into the "src/" folder or for Maven based projects into "src/main/resources".

            The answer to this question also suggests this should be the location of the properties file.

            The TinyLog website also shows the following as an example to use in the properties file:

            tinylog.level = warning

            The path of my properties file is src/main/resources/tinylog.properties. The content is:

            ...

            ANSWER

            Answered 2021-May-05 at 13:57

            The cause for your problem is that you are using tinylog 2 with configuration syntax of legacy tinylog 1. You can find the configuration documentation for tinylog 2 here: https://tinylog.org/v2/configuration/

            In your case, the tinylog 2 configuration syntax for tinylog.properties will be:

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

            QUESTION

            how to use array join in Clickhouse
            Asked 2021-Mar-22 at 22:14

            I'm trying to split 2 arrays using arrayJoin()

            my table:

            ...

            ANSWER

            Answered 2021-Mar-22 at 18:45

            The serial calls of arrayJoin produces the cartesian product, to avoid it use ARRAY JOIN:

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

            QUESTION

            TinyLog v2 with multimodule maven project spring-boot
            Asked 2021-Feb-13 at 11:54

            Hi I have a multimodule springboot based project and I would like to keep logging separate for each module. I am using tiny log 2, but the issue I am facing is that, when there is a stack trace thrown, it is not getting captured in my rolling log file. Here is the tinyLog configuration:

            ...

            ANSWER

            Answered 2021-Feb-13 at 11:54

            This is likely due to one of the following two causes:

            1) The Maven Configuration is Incomplete

            For using tinylog instead of Logback, which is the default logging back-end of Spring Boot, you have to exclude Spring Boot's logging dependencies and replace them with the corresponding tinylog artifacts:

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

            QUESTION

            Using tinylog with two console writers in parallel
            Asked 2020-Oct-30 at 14:02

            I am using https://mvnrepository.com/artifact/org.tinylog/tinylog-api/2.2.0 in our project.

            I can configure my writer format the following way:

            ...

            ANSWER

            Answered 2020-Oct-30 at 14:02

            QUESTION

            How to write one-line logs with tinylog 2?
            Asked 2020-Oct-25 at 21:06

            I'm using https://tinylog.org/v2/ for logging.

            Per default the framework logs each statement in two lines

            ...

            ANSWER

            Answered 2020-Oct-25 at 21:06

            You can set a format pattern for your log entries via the Configuration class programmatically.

            Example:

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

            QUESTION

            How to use tinylog in Eclipse plugin
            Asked 2020-May-04 at 19:22

            I am writing an Eclipse plugin and want to use tinylog in my plugin code. I tried this:

            1). modified Eclipse config file (eclipse.ini) to add this line: -Dtinylog.configuration=C:\eclipse-cpp-2018-09-win32-x86_64\eclipse\tinylog.properties

            2). content of tinylog.properties:

            ...

            ANSWER

            Answered 2020-May-04 at 19:22

            You are using tinylog 1 with a configuration for tinylog 2. The correct configuration for tinylog 1.3.6 would be:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install tinylog

            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/pymumu/tinylog.git

          • CLI

            gh repo clone pymumu/tinylog

          • sshUrl

            git@github.com:pymumu/tinylog.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