1 Star 0 Fork 1

kolonse / log4cplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

% log4cplus README

Short Description

log4cplus is a simple to use C++20 logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration. It is modeled after the Java log4j API.

Latest Project Information

The latest up-to-date information for this project can be found on GitHub project page or log4cplus wiki there. Please submit bugs, patches, feature requests, etc., on GitHub.

Mission statement

The aim of this project is to develop log4j--like logging framework for use in (primarily) C++. One of the major design goals is to avoid huge dependencies (like Boost) in the core functionality and to use standard C++ facilities instead. Where possible, the project takes inspiration from other logging libraries, beside from log4j (e.g., from log4net, log4cxx, log4cpp).

Platform support

log4cplus version 3.0 and beyond require C++20. log4cplus has been ported to and tested on the following platforms:

  • Linux/AMD64 with GCC version 8.3.0 (Ubuntu 8.3.0-6ubuntu1)
  • Linux/AMD64 with Clang version 8.0.0-3 (tags/RELEASE_800/final)
  • Windows/AMD64 with GCC version 4.8.2 (x86_64-posix-seh-rev3, Built by MinGW-W64 project) using CMake build system
  • Windows/AMD64 with GCC version 4.9.2 (tdm64-1) using CMake build system
  • Windows 7 with MS Visual Studio 2015
  • OpenBSD 5.6/AMD64 with GCC version 4.9.0
  • FreeBSD 10.1/i386 with Clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032)
  • NetBSD 6.1.5/AMD64 with GCC version 4.9.1
  • DragonflyBSD 4.0.1/AMD64 with GCC version 4.9.3 20141126 (prerelease) (FreeBSD Ports Collection)
  • OpenIndiana Hipster 2016.10 with GCC version 4.9.4

The testing on the above listed platforms has been done at some point in time with some version of source. Continuous testing is done only on Linux platform offered by [Travis CI][11] service.

The oldest Windows version that is supported by 2.x releases is Windows Vista.

The following platforms were supported by the 1.x series of log4cplus. They either do not have a reasonable C++20 capable compiler or have not been checked with log4cplus 3.x, yet:

  • Minix 3.3.0/i386 with Clang version 3.4 (branches/release_34) with --disable-threads
  • Linux/AMD64 with Intel Parallel Studio XE 2015, ICPC version 15.0.1
  • OpenSolaris with -library=stlport4
  • Solaris with -library=stlport4 and with -library=Cstd.
  • Solaris 5.10/Sparc
  • MacOS X 10.8
  • MacOS X 11.4.2
  • HP-UX (hppa2.0w-hp-hpux11.11)
  • Haiku R1 Alpha 4.1
  • AIX 5.3 with IBM XL C/C++ for AIX

Installation instruction

Generic Autotools installation instructions are in INSTALL file. The following are log4cplus specific instructions.

log4cplus uses Git sub-modules. Always use --recurse-submodules option when doing git clone.

Configure script options

--enable-debugging

This option is disabled by default. This option mainly affects GCC builds but it also has some limited effect on non-GCC builds. It turns on debugging information generation, undefines NDEBUG symbol and adds -fstack-check (GCC).

--enable-warnings

This option is enabled by default. It adds platform / compiler dependent warning options to compiler command line.

--enable-so-version

This option is enabled by default. It enables SO version decoration on resulting library file, e.g., the .2.0.0 in liblog4cplus-1.2.so.2.0.0.

--enable-release-version

This option is enabled by default. It enables release version decoration on the resulting library file, e.g., the -1.2 in liblog4cplus-1.2.so.2.0.0.

--enable-symbols-visibility-options

This option is enabled by default. It enables use of compiler and platform specific option for symbols visibility. See also the Visibility page on GCC Wiki.

--enable-profiling

This option is disabled by default. This option adds profiling information generation compiler option -pg to GCC and Sun CC / Solaris Studio builds.

--enable-threads

This option is enabled by default. It turns on detection of necessary compiler and linker flags that enable POSIX threading support.

While this detection usually works well, some platforms still need help with configuration by supplying additional flags to the configure script. One of the know deficiencies is Solaris Studio on Linux. See one of the later note for details.

--enable-tests

This option is enabled by default. It enables compilation of test executables.

--enable-unit-tests

This option is disabled by default. It enables compilation of unit tests along their units. These unit tests then can be executed through unit_tests test executable that is built during compilation.

--enable-implicit-initialization

This option is enabled by default. It enables implicit initialization of log4cplus. When it is turned off, log4cplus has to be explicitly initialized by calling either log4cplus::initialize() or by instantiating log4cplus::Initializer.

--enable-lto

This option is disabled by default. It enables LTO (Link-Time Optimization) builds.

--with-wchar_t-support

This option is enabled by default. When enabled, additional binaries will be built, marked with U suffix in file name and compiled with -DUNICODE=1 flag. In effect, these binaries assume that log4cplus::tchar is wchar_t.

--with-working-locale

This is one of three locale and wchar_tchar conversion related options. It is disabled by default.

It is know to work well with GCC on Linux. Other platforms generally have lesser locale support in their implementations of the C++ standard library. It is known not to work well on any BSDs.

See also docs/unicode.txt.

--with-working-c-locale

This is second of wchar_tchar conversion related options. It is disabled by default.

It is known to work well on most Unix--like platforms, including recent Cygwin.

--with-iconv

This is third of wchar_tchar conversion related options. It is disabled by default.

The conversion using iconv() function always uses "UTF-8" and "WCHAR_T" as source/target encoding. It is known to work well on platforms with GNU iconv. Different implementations of iconv() might not support "WCHAR_T" encoding selector.

Either system provided iconv() or library provided libiconv() are detected and accepted. Also both SUSv3 and GNU iconv() function signatures are accepted.

--with-qt

This option is disabled by default. It enables compilation of a separate shared library (liblog4cplusqt4debugappender) that implements Qt4DebugAppender. It requires Qt4 and pkg-config to be installed.

--with-qt5

This option is disabled by default. It enables compilation of a separate shared library (liblog4cplusqt5debugappender) that implements Qt5DebugAppender. It requires Qt5 and pkg-config to be available.

Notes

Compilation

On Unix--like platforms, log4cplus can be compiled using either autotools based build system or using CMake build system. The autotools based build system is considered to be primary for Unix--like platforms.

On Windows, the primary build system is Visual Studio 2015 solution and projects (msvc14/log4cplus.sln).

MinGW is supported by autotools based build system. CMake build system is supported as well and it should be used to compile log4cplus with older versions of Visual Studio or with less common compiler suites (e.g., Embarcadero, Code::Blocks, etc.).

Cygwin

Cygwin 2.5.x has a problem^pr64697 linking binaries that use language level thread-local storage and share thread-local variables across translation units. To avoid the issue language level thread-local storage is not used on Cygwin and traditional POSIX thread-local storage is used instead.

MinGW and MSVCRT version

log4cplus can use functions like _vsnprintf_s() (Microsoft's secure version of vsnprintf()). MinGW tool--chains (by default) link to the system MSVCRT.DLL. Unfortunately, older systems, like Windows XP, ship with MSVCRT.DLL that lacks these functions. It is possible to compile log4cplus with MinGW tool--chains but without using Microsoft's secure functions by defining __MSVCRT_VERSION__ to value less than 0x900 and vice versa.

$ ../configure CPPFLAGS="-D__MSVCRT_VERSION__=0x700"

Windows and Visual Studio

log4cplus uses C++11 thread and synchronization facilities. The synchronization facilities are implemented in Visual Studio C++ standard library in a way that utilizes global variables. Therefore it is impossible (due to "static initialization order fiasco") to use them outside main(). This issue manifests as a deadlock on exit during destruction of log4cplus' thread pool.

To overcome this limitation,

  • always use log4cplus::Initializer initializer; as the first thing in main();

  • never try to log from static/global objects constructors;

  • never try to log from static/global object destructors.

Defining the log4cplus::Initializer instance as the first thing in main() ensures that log4cplus is initialized. More importantly, it ensures that log4cplus shuts down before the execution leaves the main() function. log4cplus will try to automatically initialize at process startup and/or on DLL load, and will not tear down until all log4cplus:Initializer instances are destroyed.

Windows and rolling file Appenders

On Windows, the standard C++ file streams open files in way that underlying Win32 file HANDLE is not open with FILE_SHARE_DELETE flag. This flag, beside shared delete, allows renaming files that have handles open to them. This issue manifests as error code 13 when the file needs to be rolled over and it is still open by another process.

This is also bug #167 on SourceForge.

Windows and TLS

log4cplus uses thread--local storage (TLS) for NDC, MDC and to optimize use of some temporary objects. On Windows there are two ways to get TLS:

  1. using TlsAlloc(), etc., functions
  2. using __declspec(thread)

While method (2) generates faster code, it has some limitations prior to Windows Vista. If log4cplus.dll is loaded at run time using LoadLibrary() (or as a dependency of such loaded library), then accessing __declspec(thread) variables can cause general protection fault (GPF) errors. This is because Windows prior to Windows Vista do not extend the TLS for libraries loaded at run time using LoadLibrary(). To allow using the best available method, log4cplus enables the method (2) by checking _WIN32_WINNT >= 0x0600 condition, when compiling log4cplus targeted to Windows Vista or later.

Linking on Windows

If you are linking your application with DLL variant of log4cplus, define LOG4CPLUS_BUILD_DLL preprocessor symbol. This changes definition of LOG4CPLUS_EXPORT symbol to __declspec(dllimport).

Android, TLS and CMake

log4cplus uses thread--local storage (TLS, see "Windows and TLS" for details). On the Android platform, when log4cplus is being compiled using the android/android.toolchain.cmake, you might get errors featuring the __emutls symbol:

global-init.cxx:268:46: error: log4cplus::internal::__emutls_t._ZN9log4cplus8internal3ptdE causes a section type conflict with log4cplus::internal::ptd

To work around this issue, invoke CMake with -DANDROID_FUNCTION_LEVEL_LINKING:BOOL=OFF option.

Threads and signals

log4cplus is not safe to be used from asynchronous signals' handlers. This is a property of most threaded programmes in general. If you are going to use log4cplus in threaded application and if you want to use log4cplus from signal handlers then your only option is to block signals in all threads but one that will handle all signals. On POSIX platforms, this is possible using the sigwait() call. log4cplus enables this approach by blocking all signals in any threads created through its threads helpers.

IBM's XL C/C++ compiler

IBM's XL C/C++ compiler executable has many variants. To compile log4cplus with threading support specify one of the compiler variants that support threading using the CXX variable on configure script command line. E.g.:

$ ../configure --enable-threads CXX=xlC_r

AIX reentrancy problem

There appears to be a reentracy problem with AIX 5.3 and xlC 8 which can result into a deadlock condition in some circumstances. It is unknown whether the problem manifests with other versions of either the OS or the compiler, too. The problem was initially reported in a bug report #103.

The core of the problem is that IBM's/xlC's standard C++ IOStreams implementation uses global non recursive lock to protect some of its state. The application in the bug report was trying to do logging using log4cplus from inside overflow() member function of a class derived from std::streambuf class. log4cplus itself uses std::ostringstream. This resulted into an attempt to recursively lock the global non recursive lock and a deadlock.

Solaris / SunOS

Some older version of this operating system might have problems linking log4cplus due to missing __tls_get_addr in their unpatched state.

Solaris Studio

Solaris Studio compilers' default standard C++ library is very non-standard. It seems that it is not conforming enough in, e.g., Sun C++ 5.12 Linux_i386 2011/11/16 (missing std::time_t, etc.), but it works well enough on Solaris with Sun C++ 5.8 2005/10/13. Thus log4cplus adds -library=stlport4 to the CXXFLAGS environment variable, unless a switch matching -library=(stlport4|stdcxx4|Cstd) is already present there. If you want to override the default supplied by log4cplus, just set it into CXXFLAGS on configure script command line.

Solaris Studio supports the __func__ symbol which can be used by log4cplus to record function name in logged events. To enable this feature, add -features=extensions switch to CXXFLAGS for configure script. Subsequently, you will have to add this switch to your application's build flags as well.

Solaris Studio on GNU/Linux

The autotools and our configure.ac combo does not handle Solaris Studio compiler on Linux well enough and needs a little help with configuration of POSIX threads:

$ COMMON_FLAGS="-L/lib/x86_64-linux-gnu/ \
-L/usr/lib/x86_64-linux-gnu/ -mt=yes -O"

$ ../configure --enable-threads=yes \
CC=/opt/solarisstudio12.3/bin/cc \
CXX=/opt/solarisstudio12.3/bin/CC \
CFLAGS="$COMMON_FLAGS" \
CXXFLAGS="$COMMON_FLAGS" \
LDFLAGS="-lpthread"

HP-UX with aCC

It is necessary to turn on C++98 mode of aCC by providing the -AA flag:

$ ../configure --enable-threads=yes CXXFLAGS="-AA"

HP-UX with aCC on IA64

There is a problem on IA64 HP-UX with aCC (HP C/aC++ B3910B A.06.20). The problem manifests as unsatisfied symbols during linking of loggingserver:

ld: Unsatisfied symbol "virtual table of loggingserver::ClientThread" in file loggingserver.o

The problem appears to be a deficiency in aCC and its support of __declspec(dllexport). To work around this issue, add --disable-symbols-visibility-options to configure script command line:

$ ../configure --disable-symbols-visibility-options \
--enable-threads=yes CXXFLAGS="-AA"

Haiku

Haiku is supported with GCC 4+. The default GCC version in Haiku is set to version 2 (based on GCC 2.95.x). To change the default GCC version to version 4, please run setgcc gcc4 command. This is to avoid linking errors like this:

main.cpp:(.text.startup+0x54a): undefined reference to `_Unwind_Resume'

Running the command switches the current GCC version to version 4. This change is permanent and global. See also Haiku ticket #8368.

Qt4 / Win32 / MSVC

In order to use log4cplus in Qt4 programs it is necessary to set following option: Treat WChar_t As Built in Type: No (/Zc:wchar_t-)

Set this option for log4cplus project and Qt4DebugAppender project in MS Visual Studio. Remember to use Unicode versions of log4cplus libraries with Qt. It is also necessary to make clear distinction between debug and release builds of Qt project and log4cplus. Do not use log4cplus release library with debug version of Qt program and vice versa.

For registering Qt4DebugAppender library at runtime, call this function: log4cplus::Qt4DebugAppender::registerAppender()

Add these lines to qmake project file for using log4cplus and Qt4DebugAppender:

INCLUDEPATH += C:\log4cplus\include
win32 {
    CONFIG(debug, debug|release) {
        LIBS += -LC:\log4cplus\msvc14\Win32\bin.Debug_Unicode -llog4cplusUD
        LIBS += -LC:\log4cplus\msvc14\Win32\bin.Debug_Unicode -llog4cplus-Qt4DebugAppender
    } else {
        LIBS += -LC:\log4cplus\msvc14\Win32\bin.Release_Unicode -llog4cplusU
        LIBS += -LC:\log4cplus\msvc14\Win32\bin.Release_Unicode -llog4cplus-Qt4DebugAppender
    }
}

Qt / GCC

You might encounter the following error during compilation with --with-qt option:

qglobal.h:943: error: ISO C++ does not support 'long long'

This is caused by -pedantic option that log4cplus adds to CXXFLAGS when compiling with GCC. To work around this issue, add -Wno-long-long GCC option to CXXFLAGS.

OpenBSD

OpenBSD 5.2 and earlier have a bug in wcsftime() function in handling of %% and %N where N is not a supported formatter. This is fixed in OpenBSD 5.3 and later. This shows as failing timeformat_test when log4cplus is compiled with -DUNICODE in CXXFLAGS.

iOS support

iOS support is based on CMake build. Use the scripts in iOS directory. The iOS.cmake toolchain file was originally taken from ios-cmake project.

To build the library for iOS, being in current folder, perform the steps below. For ARMv7 architecture:

$ ./scripts/cmake_ios_armv7.sh
$ cmake --build ./build_armv7 --config "Release"
$ cmake --build ./build_armv7 --config "Debug"

For i386 architecture:

$ ./scripts/cmake_ios_i386.sh
$ cmake --build ./build_i386 --config "Release"
$ cmake --build ./build_i386 --config "Debug"

Some versions of the iOS and/or its SDK have problems with thread-local storage (TLS) and getting through CMake's environment detection phase. To work around these issues, make these changes:

Edit the iOS.cmake file and add these two lines.

set (CMAKE_CXX_COMPILER_WORKS TRUE)
set (CMAKE_C_COMPILER_WORKS TRUE)

Add these lines. Customize them accordingly:

set(MACOSX_BUNDLE_GUI_IDENTIFIER com.example)
set(CMAKE_MACOSX_BUNDLE YES)
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
set(IPHONEOS_ARCHS arm64)

If you have issues with TLS, also comment out these lines:

set(LOG4CPLUS_HAVE_TLS_SUPPORT 1)
set(LOG4CPLUS_THREAD_LOCAL_VAR "__thread")

LOG4CPLUS_*_FMT() and UNICODE

Beware, the %s specifier does not work the same way on Unix--like platforms as it does on Windows with Visual Studio. With Visual Studio the %s specifier changes its meaning conveniently by printing wchar_t string when used with wprintf() and char strings when used with printf(). On the other hand, Unix--like platforms keeps the meaning of printing char strings when used with both wprintf() and printf(). It is necessary to use %ls (C99) specifier or %S (SUSv2) specifier to print wchar_t strings on Unix--like platforms.

The common ground for both platforms appears to be use of %ls and wchar_t string to print strings with unmodified formatting string argument on both Unix--like platforms and Windows. The conversion of wchar_t back to char then depends on C locale.

Unsupported compilers and platforms

log4cplus does not support too old or broken C++ compilers. Since log4cplus version 3.0.0, it means it does not support any platform or compiler without decent C++20 support.

  • Visual Studio prior to 2015
  • GCC prior to 4.8

Bug reporting instructions

For successful resolution of reported bugs, it is necessary to provide enough information:

  • log4cplus

    • What is the exact release version or Git branch and revision?
    • What is the build system that you are building log4cplus with (Autotools, Visual Studio solution and its version, CMake).
    • Autotools -- Provide configure script parameters and environment variables, attach generated config.log and defines.hxx files.
    • CMake -- Provide build configuration (Release, Debug, RelWithDebInfo) and non--default CMAKE_* variables values.
    • Visual Studio -- Provide project configuration (Release, Release_Unicode, Debug, Debug_Unicode) and Visual Studio version.
    • Provide target OS and CPU. In case of MinGW, provide its exact compiler distribution -- TDM? Nuwen? Other?
  • log4cplus client application

    • Are you using shared library log4cplus or as static library log4cplus?
    • Is log4cplus linked into an executable or into a shared library (DLL or SO)?
    • If log4cplus is linked into a shared library, is this library loaded dynamically or not?
    • What library file you are linking your application with -- log4cplus.lib, log4cplusUSD.lib, liblog4cplus.dll.a, etc., on Windows?
    • Is your application is using Unicode/wchar_t or not?
    • Provide any error messages.
    • Provide stack trace.
    • Provide log4cplus properties/configuration files.
    • Provide a self--contained test case, if possible.

License

This library is licensed under the Apache Public License 2.0 and two clause BSD license. Please read the included LICENSE file for details.

Contributions

log4cplus (bug tracker, files, wiki) is hosted on GitHub. See also Contributions topic on wiki.

Patches

Anybody can contribute to log4cplus development. If you are contributing a source code change, use a reasonable form: a merge request of a Git branch.

Formatting

Please use common sense. Follow the style of surrounding code. You can use the following Emacs style that is based on Microsoft's style as a guide line:

;; Custom MS like indentation style.
(c-add-style "microsoft"
             '("stroustrup"
               (c-offsets-alist
                (innamespace . -)
                (inline-open . 0)
                (inher-cont . c-lineup-multi-inher)
                (arglist-cont-nonempty . +)
                (template-args-cont . +))))

Tools

Build system

log4cplus supports multiple build systems (GNU Autoconf/Automake/Libtool aka Autotools, CMake and Visual Studio solution and project files).

Autotools is considered the primary build system on Unix--like platforms. However, CMake should still be usable on Unix--like platforms as well.

On Windows, it depends on compiler and tool-chain that you want to use. When using Visual Studio, use Visual Studio solution and project files. However, CMake build system should still work and produce useful results. When using some form of MinGW64 tool-chain, the CMake build system is considered primary and the Autotools based build system is unsupported. Use the MinGW Makefiles option and build with mingw-make (or similar). The MSYS Makefiles option is untested and unsupported.

Autotools

The Makefile.am files for this build systems are hand written. Some of them, however, are generated from Makefile.am.tpl and Makefile.am.def by GNU Autogen. This is to make adding new files to the source easier.

To regenerate Makefile.am files, configure script, testsuite script or any other part of the Autotools build system, use the scripts/doautoreconf.sh script from source root directory. It will invoke all the necessary tools in the correct order.

log4cplus closely follows Autoconf's, Automake's and Libtool's development and its master branch files are always generated using the latest available version of the tools.

Log4cplus license ================= Each file of log4cplus source is licensed using either two clause BSD license or Apache license 2.0. Log4cplus is derived work from log4j. Threadpool code is licensed under separate license. Two clause BSD license ---------------------- Copyright © 1999--2009 Contributors to log4cplus project. All rights reserved. Redistribution and use in source and binary forms, with or without modifica tion, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Apache 2.0 license ------------------ Apache License; Version 2.0, January 2004; http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS Log4j license ============= Apache License; Version 2.0, January 2004; http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work ====================================================== To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 1999-2009 [Contributors to log4cplus project] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Threadpool license ================== Copyright (c) 2012-2015 Jakob Progsch This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Modified for log4cplus, copyright (c) 2014-2015 Václav Zeman.

简介

mirror from github 展开 收起
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/kolonse_zhjsh/log4cplus.git
git@gitee.com:kolonse_zhjsh/log4cplus.git
kolonse_zhjsh
log4cplus
log4cplus
master

搜索帮助