Giter Site home page Giter Site logo

liuwanfu / log4qt-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meonmedical/log4qt

0.0 1.0 0.0 929 KB

Log4Qt - Logging for the Qt cross-platform application framework

License: Apache License 2.0

QMake 1.57% C++ 93.31% C 0.06% CMake 3.50% QML 1.57%

log4qt-1's Introduction

Log4Qt - Logging for the Qt cross-platform application framework

Continuous Integration

Travis CI (Linux) Build Status

Appveyor CI (Windows) Build status

Description

Log4Qt is a C++ port of the Apache Software Foundation Log4j package using the Qt Framework. It is intended to be used by open source and commercial Qt projects.

Original project

http://log4qt.sourceforge.net/

This Log4Qt repository is a clone of the Log4Qt repository from https://gitorious.org/log4qt which was itself a clone of the original Log4Qt project on SourceForge http://sourceforge.net/projects/log4qt/ (http://log4qt.sourceforge.net/).

Additional features

  • SimpleTimeLayout (“dd.MM.yyyy hh:mm [Thread] Level Logger Message”)
  • ColorConsoleAppender (render colorized message by escape sequence and put it to console)
  • SignalAppender (emit signal when log event happens)
  • DatabaseAppender (append log event into sql table)
  • DatabaseLayout (put log event into sql table columns)
  • Telnet appender (append log event to telnet clients)
  • LogStream (qDebug()-style log messages appending)
  • MainThreadAppender (Proxy appender for sending log messages through event loop)
  • XMLLayout to support apache chainsaw
  • DailyFileAppender which generates a logfile for each day (add current date formatted to the filename)
  • Binary logger
  • Windows Debug Console Appender

Requirements

  • Minimum Qt version required Qt5.12 (for support of Qt versions down to 5.3 use branch 1.4 or the lates 1.4.x release or for support of Qt versions down to 5.7 use branch 1.5 or the lates 1.5.x release)
  • C++11 feature required (minimum compiler version MSVC14, GCC 4.8 or CLANG 3.3)

License

Apache License 2, Version 2.0

Clone

git clone https://github.com/MEONMedical/Log4Qt.git

Build and install

qmake

use qmake to build the project

*NIX
    qmake
    make
    make install

WIN* (mingw)
    qmake
    mingw32-make
    mingw32-make install

WIN* (msvc)
    qmake
    msbuild Log4Qt.sln
    msbuild /t:INSTALL Log4Qt.sln

For static build call qmake with
qmake "DEFINES+=LOG4QT_STATIC" or uncommend LOG4QT_STATIC in the build.pri file
Don't forget to define LOG4QT_STATIC also in your project.

Logging to a database via databaseappender can be enabled with qmake "QT += sql"

include in your project

Can also be used by adding the log4qt source directly to your Qt project file by adding the following line: include(/src/log4qt/log4qt.pri)

cmake

cmake is the second option to build Log4Qt. An out-of-source build is required: <unpack/fetch to Log4Qt directory> mkdir Log4Qt-build cd Log4Qt-build cmake ../Log4Qt make/mingw32-make/msbuild Log4Qt.sln (same as with qmake) make/mingw32-make install or: msbuild /t:INSTALL Log4Qt.sln

Addition cmake options are
    * '-DBUILD_STATIC_LOG4CXX_LIB=ON|OFF' to build static log4qt lib (default: OFF)
    * '-DBUILD_WITH_DB_LOGGING=ON|OFF' to build with database logging support

log4qt-1's People

Contributors

andibacher avatar bf-bryants avatar chehrlic avatar debrouxl avatar filonenko-mikhail avatar johannanhofer avatar maleadt avatar murzz avatar nioncode avatar rangelreale avatar

Watchers

 avatar

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.