├── .gitignore
├── AUTHORS
├── CMakeLists.txt
├── LICENCE
├── LICENSE
├── LICENSE.996ICU
├── LICENSE.MIT
├── README.md
├── conf
├── easylogging.conf
└── logkafka.conf
├── docs
├── FAQ.md
├── Features.md
├── Users.md
├── imgs
│ ├── add_cluster.png
│ ├── create_logkafka.png
│ ├── delete_logkafka.png
│ ├── list_logkafka.png
│ └── logkafka.png
├── install-libgdbm.md
├── install-libpcre2.md
├── install-librdkafka.md
├── install-libuv.md
├── install-libzookeeper_mt.md
├── install-php-zookeeper-extension.md
└── ppt
│ ├── log_collection_research_report.key
│ └── logkafka.graffle
├── modules
├── Buildlibpcre2.cmake
├── Buildlibrdkafka.cmake
├── Buildlibuv.cmake
├── Buildlibzookeeper_mt.cmake
├── CodeCoverage.cmake
├── Findlibgcov.cmake
├── Findlibpcre2.cmake
├── Findlibpthread.cmake
├── Findlibrdkafka.cmake
├── Findlibrt.cmake
├── Findlibuv.cmake
├── Findlibz.cmake
└── Findlibzookeeper_mt.cmake
├── patches
└── ZOOKEEPER-2049.noprefix.trunk.patch
├── src
├── CMakeLists.txt
├── base
│ ├── IndexedProperty.h
│ ├── Property.h
│ ├── ROProperty.h
│ ├── RWProperty.h
│ ├── WOProperty.h
│ ├── common.h
│ ├── json.cc
│ ├── json.h
│ ├── mutex.h
│ ├── noncopyable.h
│ ├── scoped_lock.h
│ ├── singleton.h
│ ├── stat_watcher.cc
│ ├── stat_watcher.h
│ ├── timer_watcher.cc
│ ├── timer_watcher.h
│ ├── tools.cc
│ └── tools.h
├── logkafka
│ ├── common.h
│ ├── config.cc
│ ├── config.h
│ ├── file_position_entry.cc
│ ├── file_position_entry.h
│ ├── filter.h
│ ├── filter_regex.cc
│ ├── filter_regex.h
│ ├── io_handler.cc
│ ├── io_handler.h
│ ├── logkafka.cc
│ ├── logkafka.h
│ ├── main.cc
│ ├── manager.cc
│ ├── manager.h
│ ├── memory_position_entry.cc
│ ├── memory_position_entry.h
│ ├── option.cc
│ ├── option.h
│ ├── output.h
│ ├── output_kafka.cc
│ ├── output_kafka.h
│ ├── position_entry.h
│ ├── position_file.cc
│ ├── position_file.h
│ ├── producer.cc
│ ├── producer.h
│ ├── properties.h
│ ├── rotate_handler.cc
│ ├── rotate_handler.h
│ ├── signal_handler.cc
│ ├── signal_handler.h
│ ├── tail_watcher.cc
│ ├── tail_watcher.h
│ ├── task_conf.h
│ ├── zookeeper.cc
│ └── zookeeper.h
└── third_party
│ ├── confuse
│ ├── .cvsignore
│ ├── AUTHORS
│ ├── CMakeLists.txt
│ ├── INSTALL
│ ├── Makefile.am
│ ├── NEWS
│ ├── README
│ ├── autogen.sh
│ ├── configure.ac
│ ├── doc
│ │ ├── .cvsignore
│ │ ├── Doxyfile.in
│ │ ├── Makefile.am
│ │ ├── css.xsl
│ │ ├── doxygen-footer.html
│ │ ├── doxygen-header.html
│ │ ├── doxygen.css
│ │ ├── listing1.c
│ │ ├── listing2.c
│ │ ├── listing3.c
│ │ ├── listing4.c
│ │ ├── listing5.c
│ │ ├── listing6.c
│ │ ├── listing7.c
│ │ ├── listing8.c
│ │ ├── tutorial.css
│ │ └── tutorial.xml
│ ├── examples
│ │ ├── .cvsignore
│ │ ├── Makefile.am
│ │ ├── ftp.conf
│ │ ├── ftpconf.c
│ │ ├── reread.c
│ │ ├── reread.conf
│ │ ├── simple.c
│ │ ├── simple.conf
│ │ ├── wincfgtest.c
│ │ ├── wincfgtest.conf
│ │ └── wincfgtest.dev
│ ├── libconfuse.pc.in
│ ├── libconfuse.spec.in
│ ├── m4
│ │ ├── .cvsignore
│ │ └── Makefile.am
│ ├── po
│ │ ├── .cvsignore
│ │ ├── LINGUAS
│ │ ├── Makevars
│ │ ├── POTFILES.in
│ │ ├── fr.po
│ │ └── sv.po
│ ├── src
│ │ ├── .cvsignore
│ │ ├── Makefile.am
│ │ ├── confuse.c
│ │ ├── confuse.h
│ │ └── lexer.l
│ └── windows
│ │ ├── borland
│ │ ├── cfgtest.bpf
│ │ ├── cfgtest.bpr
│ │ ├── config.h
│ │ ├── confuse.bpg
│ │ ├── libConfuse.bpf
│ │ └── libConfuse.bpr
│ │ ├── devcpp
│ │ ├── cfgtest.dev
│ │ ├── config.h
│ │ └── libConfuse.dev
│ │ ├── mingw
│ │ ├── README.TXT
│ │ └── build.bat
│ │ ├── msvc6
│ │ └── libConfuse
│ │ │ ├── config.h
│ │ │ ├── libConfuse.dsp
│ │ │ ├── libConfuse.dsw
│ │ │ └── unistd.h
│ │ └── msvs.net
│ │ ├── cfgtest
│ │ └── cfgtest.vcproj
│ │ ├── config.h
│ │ ├── libConfuse
│ │ └── libConfuse.vcproj
│ │ ├── msvs.net.sln
│ │ └── unistd.h
│ ├── easylogging
│ └── easylogging++.h
│ ├── rapidjson
│ ├── .gitignore
│ ├── .gitmodules
│ ├── .travis.yml
│ ├── CHANGELOG.md
│ ├── CMakeLists.txt
│ ├── RapidJSON.pc.in
│ ├── RapidJSONConfig.cmake.in
│ ├── RapidJSONConfigVersion.cmake.in
│ ├── appveyor.yml
│ ├── bin
│ │ ├── data
│ │ │ ├── glossary.json
│ │ │ ├── menu.json
│ │ │ ├── readme.txt
│ │ │ ├── sample.json
│ │ │ ├── webapp.json
│ │ │ └── widget.json
│ │ ├── encodings
│ │ │ ├── utf16be.json
│ │ │ ├── utf16bebom.json
│ │ │ ├── utf16le.json
│ │ │ ├── utf16lebom.json
│ │ │ ├── utf32be.json
│ │ │ ├── utf32bebom.json
│ │ │ ├── utf32le.json
│ │ │ ├── utf32lebom.json
│ │ │ ├── utf8.json
│ │ │ └── utf8bom.json
│ │ └── jsonchecker
│ │ │ ├── fail1.json
│ │ │ ├── fail10.json
│ │ │ ├── fail11.json
│ │ │ ├── fail12.json
│ │ │ ├── fail13.json
│ │ │ ├── fail14.json
│ │ │ ├── fail15.json
│ │ │ ├── fail16.json
│ │ │ ├── fail17.json
│ │ │ ├── fail18.json
│ │ │ ├── fail19.json
│ │ │ ├── fail2.json
│ │ │ ├── fail20.json
│ │ │ ├── fail21.json
│ │ │ ├── fail22.json
│ │ │ ├── fail23.json
│ │ │ ├── fail24.json
│ │ │ ├── fail25.json
│ │ │ ├── fail26.json
│ │ │ ├── fail27.json
│ │ │ ├── fail28.json
│ │ │ ├── fail29.json
│ │ │ ├── fail3.json
│ │ │ ├── fail30.json
│ │ │ ├── fail31.json
│ │ │ ├── fail32.json
│ │ │ ├── fail33.json
│ │ │ ├── fail4.json
│ │ │ ├── fail5.json
│ │ │ ├── fail6.json
│ │ │ ├── fail7.json
│ │ │ ├── fail8.json
│ │ │ ├── fail9.json
│ │ │ ├── pass1.json
│ │ │ ├── pass2.json
│ │ │ ├── pass3.json
│ │ │ └── readme.txt
│ ├── doc
│ │ ├── CMakeLists.txt
│ │ ├── Doxyfile.in
│ │ ├── Doxyfile.zh-cn.in
│ │ ├── diagram
│ │ │ ├── architecture.dot
│ │ │ ├── architecture.png
│ │ │ ├── insituparsing.dot
│ │ │ ├── insituparsing.png
│ │ │ ├── iterative-parser-states-diagram.dot
│ │ │ ├── iterative-parser-states-diagram.png
│ │ │ ├── makefile
│ │ │ ├── move1.dot
│ │ │ ├── move1.png
│ │ │ ├── move2.dot
│ │ │ ├── move2.png
│ │ │ ├── move3.dot
│ │ │ ├── move3.png
│ │ │ ├── normalparsing.dot
│ │ │ ├── normalparsing.png
│ │ │ ├── simpledom.dot
│ │ │ ├── simpledom.png
│ │ │ ├── tutorial.dot
│ │ │ ├── tutorial.png
│ │ │ ├── utilityclass.dot
│ │ │ └── utilityclass.png
│ │ ├── dom.md
│ │ ├── dom.zh-cn.md
│ │ ├── encoding.md
│ │ ├── encoding.zh-cn.md
│ │ ├── faq.md
│ │ ├── faq.zh-cn.md
│ │ ├── features.md
│ │ ├── features.zh-cn.md
│ │ ├── internals.md
│ │ ├── logo
│ │ │ ├── rapidjson.png
│ │ │ └── rapidjson.svg
│ │ ├── misc
│ │ │ ├── DoxygenLayout.xml
│ │ │ ├── doxygenextra.css
│ │ │ ├── footer.html
│ │ │ └── header.html
│ │ ├── performance.md
│ │ ├── performance.zh-cn.md
│ │ ├── pointer.md
│ │ ├── sax.md
│ │ ├── sax.zh-cn.md
│ │ ├── stream.md
│ │ ├── stream.zh-cn.md
│ │ ├── tutorial.md
│ │ └── tutorial.zh-cn.md
│ ├── example
│ │ ├── CMakeLists.txt
│ │ ├── capitalize
│ │ │ └── capitalize.cpp
│ │ ├── condense
│ │ │ └── condense.cpp
│ │ ├── messagereader
│ │ │ └── messagereader.cpp
│ │ ├── pretty
│ │ │ └── pretty.cpp
│ │ ├── prettyauto
│ │ │ └── prettyauto.cpp
│ │ ├── serialize
│ │ │ └── serialize.cpp
│ │ ├── simpledom
│ │ │ └── simpledom.cpp
│ │ ├── simplereader
│ │ │ └── simplereader.cpp
│ │ ├── simplewriter
│ │ │ └── simplewriter.cpp
│ │ └── tutorial
│ │ │ └── tutorial.cpp
│ ├── include
│ │ └── rapidjson
│ │ │ ├── allocators.h
│ │ │ ├── document.h
│ │ │ ├── encodedstream.h
│ │ │ ├── encodings.h
│ │ │ ├── error
│ │ │ ├── en.h
│ │ │ └── error.h
│ │ │ ├── filereadstream.h
│ │ │ ├── filewritestream.h
│ │ │ ├── internal
│ │ │ ├── biginteger.h
│ │ │ ├── diyfp.h
│ │ │ ├── dtoa.h
│ │ │ ├── ieee754.h
│ │ │ ├── itoa.h
│ │ │ ├── meta.h
│ │ │ ├── pow10.h
│ │ │ ├── stack.h
│ │ │ ├── strfunc.h
│ │ │ └── strtod.h
│ │ │ ├── memorybuffer.h
│ │ │ ├── memorystream.h
│ │ │ ├── msinttypes
│ │ │ ├── inttypes.h
│ │ │ └── stdint.h
│ │ │ ├── pointer.h
│ │ │ ├── prettywriter.h
│ │ │ ├── rapidjson.h
│ │ │ ├── reader.h
│ │ │ ├── stringbuffer.h
│ │ │ └── writer.h
│ ├── license.txt
│ ├── readme.md
│ ├── readme.zh-cn.md
│ ├── test
│ │ ├── CMakeLists.txt
│ │ ├── perftest
│ │ │ ├── CMakeLists.txt
│ │ │ ├── misctest.cpp
│ │ │ ├── perftest.cpp
│ │ │ ├── perftest.h
│ │ │ ├── platformtest.cpp
│ │ │ └── rapidjsontest.cpp
│ │ └── unittest
│ │ │ ├── CMakeLists.txt
│ │ │ ├── allocatorstest.cpp
│ │ │ ├── bigintegertest.cpp
│ │ │ ├── documenttest.cpp
│ │ │ ├── encodedstreamtest.cpp
│ │ │ ├── encodingstest.cpp
│ │ │ ├── filestreamtest.cpp
│ │ │ ├── itoatest.cpp
│ │ │ ├── jsoncheckertest.cpp
│ │ │ ├── namespacetest.cpp
│ │ │ ├── pointertest.cpp
│ │ │ ├── prettywritertest.cpp
│ │ │ ├── readertest.cpp
│ │ │ ├── simdtest.cpp
│ │ │ ├── stringbuffertest.cpp
│ │ │ ├── strtodtest.cpp
│ │ │ ├── unittest.cpp
│ │ │ ├── unittest.h
│ │ │ ├── valuetest.cpp
│ │ │ └── writertest.cpp
│ └── travis-doxygen.sh
│ └── tclap
│ ├── AUTHORS
│ ├── COPYING
│ ├── ChangeLog
│ ├── INSTALL
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── NEWS
│ ├── README
│ ├── aclocal.m4
│ ├── config
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── ac_cxx_have_long_long.m4
│ ├── ac_cxx_have_sstream.m4
│ ├── ac_cxx_have_strstream.m4
│ ├── ac_cxx_namespaces.m4
│ ├── ac_cxx_warn_effective_cxx.m4
│ ├── bb_enable_doxygen.m4
│ ├── config.h.in
│ ├── depcomp
│ ├── install-sh
│ ├── missing
│ └── mkinstalldirs
│ ├── configure
│ ├── configure.in
│ ├── docs
│ ├── Doxyfile.in
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── README
│ ├── html
│ │ ├── ArgException_8h.html
│ │ ├── ArgException_8h_source.html
│ │ ├── ArgTraits_8h.html
│ │ ├── ArgTraits_8h_source.html
│ │ ├── Arg_8h.html
│ │ ├── Arg_8h_source.html
│ │ ├── CVS
│ │ │ ├── Entries
│ │ │ ├── Repository
│ │ │ └── Root
│ │ ├── CmdLineInterface_8h.html
│ │ ├── CmdLineInterface_8h_source.html
│ │ ├── CmdLineOutput_8h.html
│ │ ├── CmdLineOutput_8h_source.html
│ │ ├── CmdLine_8h.html
│ │ ├── CmdLine_8h_source.html
│ │ ├── Constraint_8h.html
│ │ ├── Constraint_8h_source.html
│ │ ├── DocBookOutput_8h.html
│ │ ├── DocBookOutput_8h_source.html
│ │ ├── HelpVisitor_8h.html
│ │ ├── HelpVisitor_8h_source.html
│ │ ├── IgnoreRestVisitor_8h.html
│ │ ├── IgnoreRestVisitor_8h_source.html
│ │ ├── MultiArg_8h.html
│ │ ├── MultiArg_8h_source.html
│ │ ├── MultiSwitchArg_8h.html
│ │ ├── MultiSwitchArg_8h_source.html
│ │ ├── OptionalUnlabeledTracker_8h.html
│ │ ├── OptionalUnlabeledTracker_8h_source.html
│ │ ├── StandardTraits_8h.html
│ │ ├── StandardTraits_8h_source.html
│ │ ├── StdOutput_8h.html
│ │ ├── StdOutput_8h_source.html
│ │ ├── SwitchArg_8h.html
│ │ ├── SwitchArg_8h_source.html
│ │ ├── UnlabeledMultiArg_8h.html
│ │ ├── UnlabeledMultiArg_8h_source.html
│ │ ├── UnlabeledValueArg_8h.html
│ │ ├── UnlabeledValueArg_8h_source.html
│ │ ├── ValueArg_8h.html
│ │ ├── ValueArg_8h_source.html
│ │ ├── ValuesConstraint_8h.html
│ │ ├── ValuesConstraint_8h_source.html
│ │ ├── VersionVisitor_8h.html
│ │ ├── VersionVisitor_8h_source.html
│ │ ├── Visitor_8h.html
│ │ ├── Visitor_8h_source.html
│ │ ├── XorHandler_8h.html
│ │ ├── XorHandler_8h_source.html
│ │ ├── ZshCompletionOutput_8h.html
│ │ ├── ZshCompletionOutput_8h_source.html
│ │ ├── annotated.html
│ │ ├── classTCLAP_1_1Arg-members.html
│ │ ├── classTCLAP_1_1Arg.gif
│ │ ├── classTCLAP_1_1Arg.html
│ │ ├── classTCLAP_1_1ArgException-members.html
│ │ ├── classTCLAP_1_1ArgException.gif
│ │ ├── classTCLAP_1_1ArgException.html
│ │ ├── classTCLAP_1_1ArgParseException-members.html
│ │ ├── classTCLAP_1_1ArgParseException.gif
│ │ ├── classTCLAP_1_1ArgParseException.html
│ │ ├── classTCLAP_1_1CmdLine-members.html
│ │ ├── classTCLAP_1_1CmdLine.gif
│ │ ├── classTCLAP_1_1CmdLine.html
│ │ ├── classTCLAP_1_1CmdLineInterface-members.html
│ │ ├── classTCLAP_1_1CmdLineInterface.gif
│ │ ├── classTCLAP_1_1CmdLineInterface.html
│ │ ├── classTCLAP_1_1CmdLineOutput-members.html
│ │ ├── classTCLAP_1_1CmdLineOutput.gif
│ │ ├── classTCLAP_1_1CmdLineOutput.html
│ │ ├── classTCLAP_1_1CmdLineParseException-members.html
│ │ ├── classTCLAP_1_1CmdLineParseException.gif
│ │ ├── classTCLAP_1_1CmdLineParseException.html
│ │ ├── classTCLAP_1_1Constraint-members.html
│ │ ├── classTCLAP_1_1Constraint.gif
│ │ ├── classTCLAP_1_1Constraint.html
│ │ ├── classTCLAP_1_1DocBookOutput-members.html
│ │ ├── classTCLAP_1_1DocBookOutput.gif
│ │ ├── classTCLAP_1_1DocBookOutput.html
│ │ ├── classTCLAP_1_1ExitException-members.html
│ │ ├── classTCLAP_1_1ExitException.html
│ │ ├── classTCLAP_1_1HelpVisitor-members.html
│ │ ├── classTCLAP_1_1HelpVisitor.gif
│ │ ├── classTCLAP_1_1HelpVisitor.html
│ │ ├── classTCLAP_1_1IgnoreRestVisitor-members.html
│ │ ├── classTCLAP_1_1IgnoreRestVisitor.gif
│ │ ├── classTCLAP_1_1IgnoreRestVisitor.html
│ │ ├── classTCLAP_1_1MultiArg-members.html
│ │ ├── classTCLAP_1_1MultiArg.gif
│ │ ├── classTCLAP_1_1MultiArg.html
│ │ ├── classTCLAP_1_1MultiSwitchArg-members.html
│ │ ├── classTCLAP_1_1MultiSwitchArg.gif
│ │ ├── classTCLAP_1_1MultiSwitchArg.html
│ │ ├── classTCLAP_1_1OptionalUnlabeledTracker-members.html
│ │ ├── classTCLAP_1_1OptionalUnlabeledTracker.html
│ │ ├── classTCLAP_1_1SpecificationException-members.html
│ │ ├── classTCLAP_1_1SpecificationException.gif
│ │ ├── classTCLAP_1_1SpecificationException.html
│ │ ├── classTCLAP_1_1StdOutput-members.html
│ │ ├── classTCLAP_1_1StdOutput.gif
│ │ ├── classTCLAP_1_1StdOutput.html
│ │ ├── classTCLAP_1_1SwitchArg-members.html
│ │ ├── classTCLAP_1_1SwitchArg.gif
│ │ ├── classTCLAP_1_1SwitchArg.html
│ │ ├── classTCLAP_1_1UnlabeledMultiArg-members.html
│ │ ├── classTCLAP_1_1UnlabeledMultiArg.gif
│ │ ├── classTCLAP_1_1UnlabeledMultiArg.html
│ │ ├── classTCLAP_1_1UnlabeledValueArg-members.html
│ │ ├── classTCLAP_1_1UnlabeledValueArg.gif
│ │ ├── classTCLAP_1_1UnlabeledValueArg.html
│ │ ├── classTCLAP_1_1ValueArg-members.html
│ │ ├── classTCLAP_1_1ValueArg.gif
│ │ ├── classTCLAP_1_1ValueArg.html
│ │ ├── classTCLAP_1_1ValuesConstraint-members.html
│ │ ├── classTCLAP_1_1ValuesConstraint.gif
│ │ ├── classTCLAP_1_1ValuesConstraint.html
│ │ ├── classTCLAP_1_1VersionVisitor-members.html
│ │ ├── classTCLAP_1_1VersionVisitor.gif
│ │ ├── classTCLAP_1_1VersionVisitor.html
│ │ ├── classTCLAP_1_1Visitor-members.html
│ │ ├── classTCLAP_1_1Visitor.gif
│ │ ├── classTCLAP_1_1Visitor.html
│ │ ├── classTCLAP_1_1XorHandler-members.html
│ │ ├── classTCLAP_1_1XorHandler.html
│ │ ├── classTCLAP_1_1ZshCompletionOutput-members.html
│ │ ├── classTCLAP_1_1ZshCompletionOutput.gif
│ │ ├── classTCLAP_1_1ZshCompletionOutput.html
│ │ ├── classes.html
│ │ ├── doxygen.css
│ │ ├── doxygen.png
│ │ ├── files.html
│ │ ├── functions.html
│ │ ├── functions_0x61.html
│ │ ├── functions_0x62.html
│ │ ├── functions_0x63.html
│ │ ├── functions_0x64.html
│ │ ├── functions_0x65.html
│ │ ├── functions_0x66.html
│ │ ├── functions_0x67.html
│ │ ├── functions_0x68.html
│ │ ├── functions_0x69.html
│ │ ├── functions_0x6c.html
│ │ ├── functions_0x6d.html
│ │ ├── functions_0x6e.html
│ │ ├── functions_0x6f.html
│ │ ├── functions_0x70.html
│ │ ├── functions_0x71.html
│ │ ├── functions_0x72.html
│ │ ├── functions_0x73.html
│ │ ├── functions_0x74.html
│ │ ├── functions_0x75.html
│ │ ├── functions_0x76.html
│ │ ├── functions_0x77.html
│ │ ├── functions_0x78.html
│ │ ├── functions_0x7a.html
│ │ ├── functions_0x7e.html
│ │ ├── functions_func.html
│ │ ├── functions_func_0x61.html
│ │ ├── functions_func_0x62.html
│ │ ├── functions_func_0x63.html
│ │ ├── functions_func_0x64.html
│ │ ├── functions_func_0x65.html
│ │ ├── functions_func_0x66.html
│ │ ├── functions_func_0x67.html
│ │ ├── functions_func_0x68.html
│ │ ├── functions_func_0x69.html
│ │ ├── functions_func_0x6c.html
│ │ ├── functions_func_0x6d.html
│ │ ├── functions_func_0x6e.html
│ │ ├── functions_func_0x6f.html
│ │ ├── functions_func_0x70.html
│ │ ├── functions_func_0x71.html
│ │ ├── functions_func_0x72.html
│ │ ├── functions_func_0x73.html
│ │ ├── functions_func_0x74.html
│ │ ├── functions_func_0x75.html
│ │ ├── functions_func_0x76.html
│ │ ├── functions_func_0x77.html
│ │ ├── functions_func_0x78.html
│ │ ├── functions_func_0x7a.html
│ │ ├── functions_func_0x7e.html
│ │ ├── functions_type.html
│ │ ├── functions_vars.html
│ │ ├── globals.html
│ │ ├── globals_defs.html
│ │ ├── globals_type.html
│ │ ├── hierarchy.html
│ │ ├── index.html
│ │ ├── namespaceTCLAP.html
│ │ ├── namespacemembers.html
│ │ ├── namespacemembers_func.html
│ │ ├── namespacemembers_type.html
│ │ ├── namespaces.html
│ │ ├── structTCLAP_1_1ArgTraits-members.html
│ │ ├── structTCLAP_1_1ArgTraits.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01bool_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01bool_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01char_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01char_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01double_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01double_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01float_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01float_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01int_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01int_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01long_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01long_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01short_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01short_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01std_1_1string_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01std_1_1string_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01char_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01char_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01int_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01int_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01long_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01long_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01short_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01unsigned_01short_01_4.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01wchar__t_01_4-members.html
│ │ ├── structTCLAP_1_1ArgTraits_3_01wchar__t_01_4.html
│ │ ├── structTCLAP_1_1StringLike-members.html
│ │ ├── structTCLAP_1_1StringLike.html
│ │ ├── structTCLAP_1_1StringLikeTrait-members.html
│ │ ├── structTCLAP_1_1StringLikeTrait.html
│ │ ├── structTCLAP_1_1ValueLike-members.html
│ │ ├── structTCLAP_1_1ValueLike.html
│ │ ├── structTCLAP_1_1ValueLikeTrait-members.html
│ │ ├── structTCLAP_1_1ValueLikeTrait.html
│ │ ├── tab_b.gif
│ │ ├── tab_l.gif
│ │ ├── tab_r.gif
│ │ └── tabs.css
│ ├── index.html
│ ├── manual.html
│ ├── manual.xml
│ └── style.css
│ ├── examples
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── test1.cpp
│ ├── test10.cpp
│ ├── test11.cpp
│ ├── test12.cpp
│ ├── test13.cpp
│ ├── test14.cpp
│ ├── test15.cpp
│ ├── test16.cpp
│ ├── test17-a.cpp
│ ├── test17.cpp
│ ├── test18.cpp
│ ├── test19.cpp
│ ├── test2.cpp
│ ├── test20.cpp
│ ├── test21.cpp
│ ├── test3.cpp
│ ├── test4.cpp
│ ├── test5.cpp
│ ├── test6.cpp
│ ├── test7.cpp
│ ├── test8.cpp
│ └── test9.cpp
│ ├── include
│ ├── Makefile.am
│ ├── Makefile.in
│ └── tclap
│ │ ├── Arg.h
│ │ ├── ArgException.h
│ │ ├── ArgTraits.h
│ │ ├── CmdLine.h
│ │ ├── CmdLineInterface.h
│ │ ├── CmdLineOutput.h
│ │ ├── Constraint.h
│ │ ├── DocBookOutput.h
│ │ ├── HelpVisitor.h
│ │ ├── IgnoreRestVisitor.h
│ │ ├── Makefile.am
│ │ ├── Makefile.in
│ │ ├── MultiArg.h
│ │ ├── MultiSwitchArg.h
│ │ ├── OptionalUnlabeledTracker.h
│ │ ├── StandardTraits.h
│ │ ├── StdOutput.h
│ │ ├── SwitchArg.h
│ │ ├── UnlabeledMultiArg.h
│ │ ├── UnlabeledValueArg.h
│ │ ├── ValueArg.h
│ │ ├── ValuesConstraint.h
│ │ ├── VersionVisitor.h
│ │ ├── Visitor.h
│ │ ├── XorHandler.h
│ │ └── ZshCompletionOutput.h
│ ├── msc
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── README
│ ├── examples
│ │ ├── Makefile.am
│ │ ├── Makefile.in
│ │ ├── test1.vcproj
│ │ ├── test2.vcproj
│ │ ├── test3.vcproj
│ │ ├── test4.vcproj
│ │ ├── test5.vcproj
│ │ ├── test6.vcproj
│ │ ├── test7.vcproj
│ │ └── test8.vcproj
│ ├── tclap-beta.ncb
│ ├── tclap-beta.sln
│ ├── tclap-beta.suo
│ └── tclap-beta.vcproj
│ └── tclap.pc.in
├── tools
├── base
│ ├── Exception.php
│ └── Monitor.php
├── getopt-php
│ ├── .travis.yml
│ ├── Argument.php
│ ├── CommandLineParser.php
│ ├── Getopt.php
│ ├── Option.php
│ └── OptionParser.php
├── grid
├── log_config.php
└── plugin
│ └── MonitorDefault.php
└── unittest
├── CMakeLists.txt
├── conf
└── easylogging.conf
├── lib
├── CMakeLists.txt
└── gtest-1.6.0
│ ├── CHANGES
│ ├── CMakeLists.txt
│ ├── CONTRIBUTORS
│ ├── COPYING
│ ├── Makefile.am
│ ├── Makefile.in
│ ├── README
│ ├── aclocal.m4
│ ├── build-aux
│ ├── config.guess
│ ├── config.h.in
│ ├── config.sub
│ ├── depcomp
│ ├── install-sh
│ ├── ltmain.sh
│ └── missing
│ ├── cmake
│ └── internal_utils.cmake
│ ├── codegear
│ ├── gtest.cbproj
│ ├── gtest.groupproj
│ ├── gtest_all.cc
│ ├── gtest_link.cc
│ ├── gtest_main.cbproj
│ └── gtest_unittest.cbproj
│ ├── configure
│ ├── configure.ac
│ ├── fused-src
│ └── gtest
│ │ ├── gtest-all.cc
│ │ ├── gtest.h
│ │ └── gtest_main.cc
│ ├── include
│ └── gtest
│ │ ├── gtest-death-test.h
│ │ ├── gtest-message.h
│ │ ├── gtest-param-test.h
│ │ ├── gtest-param-test.h.pump
│ │ ├── gtest-printers.h
│ │ ├── gtest-spi.h
│ │ ├── gtest-test-part.h
│ │ ├── gtest-typed-test.h
│ │ ├── gtest.h
│ │ ├── gtest_pred_impl.h
│ │ ├── gtest_prod.h
│ │ └── internal
│ │ ├── gtest-death-test-internal.h
│ │ ├── gtest-filepath.h
│ │ ├── gtest-internal.h
│ │ ├── gtest-linked_ptr.h
│ │ ├── gtest-param-util-generated.h
│ │ ├── gtest-param-util-generated.h.pump
│ │ ├── gtest-param-util.h
│ │ ├── gtest-port.h
│ │ ├── gtest-string.h
│ │ ├── gtest-tuple.h
│ │ ├── gtest-tuple.h.pump
│ │ ├── gtest-type-util.h
│ │ └── gtest-type-util.h.pump
│ ├── m4
│ ├── acx_pthread.m4
│ ├── gtest.m4
│ ├── libtool.m4
│ ├── ltoptions.m4
│ ├── ltsugar.m4
│ ├── ltversion.m4
│ └── lt~obsolete.m4
│ ├── make
│ └── Makefile
│ ├── msvc
│ ├── gtest-md.sln
│ ├── gtest-md.vcproj
│ ├── gtest.sln
│ ├── gtest.vcproj
│ ├── gtest_main-md.vcproj
│ ├── gtest_main.vcproj
│ ├── gtest_prod_test-md.vcproj
│ ├── gtest_prod_test.vcproj
│ ├── gtest_unittest-md.vcproj
│ └── gtest_unittest.vcproj
│ ├── samples
│ ├── prime_tables.h
│ ├── sample1.cc
│ ├── sample1.h
│ ├── sample10_unittest.cc
│ ├── sample1_unittest.cc
│ ├── sample2.cc
│ ├── sample2.h
│ ├── sample2_unittest.cc
│ ├── sample3-inl.h
│ ├── sample3_unittest.cc
│ ├── sample4.cc
│ ├── sample4.h
│ ├── sample4_unittest.cc
│ ├── sample5_unittest.cc
│ ├── sample6_unittest.cc
│ ├── sample7_unittest.cc
│ ├── sample8_unittest.cc
│ └── sample9_unittest.cc
│ ├── scripts
│ ├── fuse_gtest_files.py
│ ├── gen_gtest_pred_impl.py
│ ├── gtest-config.in
│ ├── pump.py
│ └── test
│ │ └── Makefile
│ ├── src
│ ├── gtest-all.cc
│ ├── gtest-death-test.cc
│ ├── gtest-filepath.cc
│ ├── gtest-internal-inl.h
│ ├── gtest-port.cc
│ ├── gtest-printers.cc
│ ├── gtest-test-part.cc
│ ├── gtest-typed-test.cc
│ ├── gtest.cc
│ └── gtest_main.cc
│ ├── test
│ ├── gtest-death-test_ex_test.cc
│ ├── gtest-death-test_test.cc
│ ├── gtest-filepath_test.cc
│ ├── gtest-linked_ptr_test.cc
│ ├── gtest-listener_test.cc
│ ├── gtest-message_test.cc
│ ├── gtest-options_test.cc
│ ├── gtest-param-test2_test.cc
│ ├── gtest-param-test_test.cc
│ ├── gtest-param-test_test.h
│ ├── gtest-port_test.cc
│ ├── gtest-printers_test.cc
│ ├── gtest-test-part_test.cc
│ ├── gtest-tuple_test.cc
│ ├── gtest-typed-test2_test.cc
│ ├── gtest-typed-test_test.cc
│ ├── gtest-typed-test_test.h
│ ├── gtest-unittest-api_test.cc
│ ├── gtest_all_test.cc
│ ├── gtest_break_on_failure_unittest.py
│ ├── gtest_break_on_failure_unittest_.cc
│ ├── gtest_catch_exceptions_test.py
│ ├── gtest_catch_exceptions_test_.cc
│ ├── gtest_color_test.py
│ ├── gtest_color_test_.cc
│ ├── gtest_env_var_test.py
│ ├── gtest_env_var_test_.cc
│ ├── gtest_environment_test.cc
│ ├── gtest_filter_unittest.py
│ ├── gtest_filter_unittest_.cc
│ ├── gtest_help_test.py
│ ├── gtest_help_test_.cc
│ ├── gtest_list_tests_unittest.py
│ ├── gtest_list_tests_unittest_.cc
│ ├── gtest_main_unittest.cc
│ ├── gtest_no_test_unittest.cc
│ ├── gtest_output_test.py
│ ├── gtest_output_test_.cc
│ ├── gtest_output_test_golden_lin.txt
│ ├── gtest_pred_impl_unittest.cc
│ ├── gtest_prod_test.cc
│ ├── gtest_repeat_test.cc
│ ├── gtest_shuffle_test.py
│ ├── gtest_shuffle_test_.cc
│ ├── gtest_sole_header_test.cc
│ ├── gtest_stress_test.cc
│ ├── gtest_test_utils.py
│ ├── gtest_throw_on_failure_ex_test.cc
│ ├── gtest_throw_on_failure_test.py
│ ├── gtest_throw_on_failure_test_.cc
│ ├── gtest_uninitialized_test.py
│ ├── gtest_uninitialized_test_.cc
│ ├── gtest_unittest.cc
│ ├── gtest_xml_outfile1_test_.cc
│ ├── gtest_xml_outfile2_test_.cc
│ ├── gtest_xml_outfiles_test.py
│ ├── gtest_xml_output_unittest.py
│ ├── gtest_xml_output_unittest_.cc
│ ├── gtest_xml_test_utils.py
│ ├── production.cc
│ └── production.h
│ └── xcode
│ ├── Config
│ ├── DebugProject.xcconfig
│ ├── FrameworkTarget.xcconfig
│ ├── General.xcconfig
│ ├── ReleaseProject.xcconfig
│ ├── StaticLibraryTarget.xcconfig
│ └── TestTarget.xcconfig
│ ├── Resources
│ └── Info.plist
│ ├── Samples
│ └── FrameworkSample
│ │ ├── Info.plist
│ │ ├── WidgetFramework.xcodeproj
│ │ └── project.pbxproj
│ │ ├── runtests.sh
│ │ ├── widget.cc
│ │ ├── widget.h
│ │ └── widget_test.cc
│ ├── Scripts
│ ├── runtests.sh
│ └── versiongenerate.py
│ └── gtest.xcodeproj
│ └── project.pbxproj
└── src
├── config_test.cc
├── manager_test.cc
└── tools_test.cc
/.gitignore:
--------------------------------------------------------------------------------
1 | ###########################################
2 | # DIRS
3 | _build
4 | _install
5 | tests
6 | cpp/tests/unittest/data
7 | CMakeFiles
8 | deploy
9 |
10 | ###########################################
11 | # SPECIAL FILES
12 | *.rpm*
13 | *.tar*
14 | *.tgz*
15 | *.swp*
16 | *.svn*
17 | *tags*
18 | *.bak
19 | Makefile
20 | CMakeCache.txt
21 | *.gdbm
22 | *.cmake
23 | gmon.out
24 | *.log
25 |
26 | ###########################################
27 | # JAVA COMMON IGNORE
28 |
29 | *.class
30 |
31 | # Mobile Tools for Java (J2ME)
32 | .mtj.tmp/
33 |
34 | # Package Files #
35 | *.jar
36 | *.war
37 | *.ear
38 |
39 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
40 | hs_err_pid*
41 |
42 | ###########################################
43 | # C++ COMMON IGNORE
44 |
45 | # Compiled Object files
46 | *.slo
47 | *.lo
48 | *.o
49 | *.obj
50 |
51 | # Compiled Dynamic libraries
52 | *.so*
53 | *.dylib
54 | *.dll
55 |
56 | # Compiled Static libraries
57 | *.lai
58 | *.la
59 | *.a
60 | *.lib
61 |
62 | # Executables
63 | *.exe
64 | *.out
65 | *.app
66 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | # Name should be added: Name or Organization(email address)
2 |
3 | Qihoo 360
4 |
5 | Qiao Junlong(qiaojunlong@360.cn)
6 | Zhu Chao(zhuchao@360.cn)
7 |
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | LICENSE.996ICU AND LICENSE.MIT
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/LICENSE
--------------------------------------------------------------------------------
/LICENSE.MIT:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 | ====
24 |
25 | This license applies to all parts of logkafka that are not externally
26 | maintained libraries.
27 |
28 | - confuse
29 | The ISC License (ISC)
30 |
31 | - easylogging
32 | Copyright (c) 2015 muflihun.com
33 | The MIT License (MIT)
34 |
35 | - rapidjson
36 | Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
37 | The MIT License (MIT)
38 |
39 | - tclap
40 | Copyright (c) 2003 Michael E. Smoot
41 | The MIT License (MIT)
42 |
--------------------------------------------------------------------------------
/conf/easylogging.conf:
--------------------------------------------------------------------------------
1 | * ALL: // We need to start level with star '*' and end with colon ':'
2 | FORMAT = "%host - %user %datetime %level %thread %loc - %log" // Quotes are not necessary but to make it more readable we wrap quotes around.
3 | FILENAME = "logs/testLog.log"
4 | ENABLED = true
5 | TO_FILE = true
6 | TO_STANDARD_OUTPUT = false
7 | MILLISECONDS_WIDTH = 3
8 | PERFORMANCE_TRACKING = false
9 | ROLL_OUT_SIZE = 2097152 // Throw log files away after 2MB
10 |
11 | // Following configuration only defines FILENAME for ERROR, rest of the configurations are used from ALL configurations above
12 | * ERROR:
13 | FILENAME = "logs/testLog_error.log" // relative to the dir of executable file
14 |
15 | * DEBUG:
16 | FILENAME = "logs/testLog_debug.log" // relative to the dir of executable file
17 |
--------------------------------------------------------------------------------
/docs/FAQ.md:
--------------------------------------------------------------------------------
1 | ## FAQ
2 |
3 | #### What situation will cause data loss
4 |
5 | 1. logkafka crash or killed when librdkafka still holds unsent messages
6 |
7 | We choose librdkafka as our message producer, librdkafka only provide *async* interface and use internal memory queue. If you set config `message_timeout_ms=0 (default value)`, the librdkafka will keep your unsent messages in its memory queue until sent successfully. Consequencely, the messages will be lost if the program crashes when there are still unsent messages in librdkafka's queue.
8 |
9 | Solution: the optimal solution is providing [disk persistent queue](https://github.com/edenhill/librdkafka/issues/31) in librdkafka, and we are working on it.
10 |
11 | 2. log file was deleted before logkafka start collecting it
12 |
13 | Assumed that current time is 2015.01.01.03, f1 is being collecting, and f2, f3 are not collected.
14 |
15 | ```
16 | f1: /usr/local/logkafka/systest/src/logkafka_test.2015.01.01.01 (Collecting)
17 | f2: /usr/local/logkafka/systest/src/logkafka_test.2015.01.01.02 (Uncollected)
18 | f3: /usr/local/logkafka/systest/src/logkafka_test.2015.01.01.03 (Uncollected)
19 | ```
20 |
21 | Now, delete f1 and f2, the data of f2 will be lost.
22 |
23 | The log file will be colleted as fast as possible, but if log file is too huge, or going through network failure, collection will be stuck.
24 |
25 | Solution: monitor the log collecting state will prevent this from happening.
26 |
27 | #### Will out-of-order delivery happen
28 |
29 | Yes, but just when network failue happen.
30 |
31 |
--------------------------------------------------------------------------------
/docs/Users.md:
--------------------------------------------------------------------------------
1 | ## Users
2 |
3 | ### Qihoo360
4 |
5 | * Team addops: We deployed logkafka over +100 servers to collect openstack logs.
6 |
7 | ### ICBC
8 |
9 | * Team SDC (Software Development Center): We use logkafka to collect ssdb read&write operation logs.
--------------------------------------------------------------------------------
/docs/imgs/add_cluster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/docs/imgs/add_cluster.png
--------------------------------------------------------------------------------
/docs/imgs/create_logkafka.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/docs/imgs/create_logkafka.png
--------------------------------------------------------------------------------
/docs/imgs/delete_logkafka.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/docs/imgs/delete_logkafka.png
--------------------------------------------------------------------------------
/docs/imgs/list_logkafka.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/docs/imgs/list_logkafka.png
--------------------------------------------------------------------------------
/docs/imgs/logkafka.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/docs/imgs/logkafka.png
--------------------------------------------------------------------------------
/docs/install-libgdbm.md:
--------------------------------------------------------------------------------
1 | ## install libgdbm
2 |
3 |
4 | For Centos, just run `sudo yum install -y gdbm`
5 |
6 | Or, build from source
7 |
8 | ```
9 | cd /tmp
10 | wget -N -O- http://ftp.gnu.org/gnu/gdbm/gdbm-1.8.3.tar.gz | tar zxvf -
11 | cd gdbm-1.8.3
12 | ./configure
13 | make -j4
14 | sudo make BINOWN=root BINGRP=root install-compat
15 | ```
16 |
--------------------------------------------------------------------------------
/docs/install-libpcre2.md:
--------------------------------------------------------------------------------
1 | ## install libpcre2
2 |
3 | For Mac:
4 | ```
5 | brew install pcre2
6 | ```
7 |
8 | For linux:
9 | ```
10 | cd /tmp
11 | wget -N -O- http://sourceforge.net/projects/pcre/files/pcre2/10.20/pcre2-10.20.tar.gz | tar zxvf -
12 | cd pcre2-10.20
13 | ./configure
14 | make -j4
15 | sudo make install
16 | ```
17 | Any problems, check [this](http://www.pcre.org/)
18 |
--------------------------------------------------------------------------------
/docs/install-librdkafka.md:
--------------------------------------------------------------------------------
1 | ## install librdkafka
2 |
3 | For Mac and linux:
4 | ```
5 | cd /tmp
6 |
7 | wget -N https://github.com/edenhill/librdkafka/archive/0.8.6.zip -O librdkafka.zip;
8 | unzip librdkafka.zip
9 | rm -f librdkafka.zip
10 |
11 | cd librdkafka-0.8.6
12 | ./configure
13 | make -j4
14 | sudo make install
15 | ```
16 |
17 | Any problems, check [this](https://github.com/edenhill/librdkafka)
18 |
--------------------------------------------------------------------------------
/docs/install-libuv.md:
--------------------------------------------------------------------------------
1 | ## install libuv
2 |
3 |
4 | For Centos, just run `sudo yum install -y libuv`
5 |
6 | Or, build from source
7 |
8 | ```
9 | cd /tmp
10 | git clone https://github.com/libuv/libuv.git
11 | cd libuv
12 | sh autogen.sh
13 | ./configure
14 | make -j4
15 | sudo make install
16 | ```
17 |
--------------------------------------------------------------------------------
/docs/install-libzookeeper_mt.md:
--------------------------------------------------------------------------------
1 | ## install libzookeeper_mt
2 |
3 |
4 | ```
5 | cd /tmp
6 |
7 | wget -N http://archive.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
8 | tar zxvf zookeeper-3.4.6.tar.gz
9 | rm -f zookeeper-3.4.6.tar.gz
10 |
11 | cd zookeeper-3.4.6/src/c
12 | ./configure
13 | make -j4
14 | sudo make install
15 | ```
16 | Any problems, check [this](http://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#Installation)
17 |
--------------------------------------------------------------------------------
/docs/install-php-zookeeper-extension.md:
--------------------------------------------------------------------------------
1 | ## install php zookeeper extension
2 |
3 | We assume that you already have php installed, version > 5.3.
4 |
5 | 1. check your php version
6 |
7 | ```
8 | php -v
9 | ```
10 |
11 | 2. download php zookeeper package
12 |
13 | ```
14 | cd /tmp
15 | wget -N -O- https://pecl.php.net/get/zookeeper-0.2.2.tgz | tar zxvf -
16 | cd zookeeper-0.2.2
17 | phpize
18 | ./configure --with-php-config=/usr/local/php/bin/php-config --with-libzookeeper-dir=/usr/local/zookeeper
19 | make
20 | sudo make install
21 | ```
22 |
23 | 3. add zookeeper item to php.ini
24 |
25 | check your php.ini
26 |
27 | ```
28 | php -i | grep php.ini
29 | ```
30 |
31 | add below to your php.ini
32 |
33 | ```
34 | ; zookeeper
35 | extension=zookeeper.so
36 | ```
--------------------------------------------------------------------------------
/docs/ppt/log_collection_research_report.key:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/docs/ppt/log_collection_research_report.key
--------------------------------------------------------------------------------
/docs/ppt/logkafka.graffle:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Qihoo360/logkafka/f329b5a9806e0b0f716884759edbe54e72e4dec0/docs/ppt/logkafka.graffle
--------------------------------------------------------------------------------
/modules/Buildlibpcre2.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "installing libpcre2 ...")
2 | CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
3 |
4 | ExternalProject_Add(project_libpcre2
5 | URL http://sourceforge.net/projects/pcre/files/pcre2/10.20/pcre2-10.20.tar.gz
6 | PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libpcre2
7 | CONFIGURE_COMMAND cd && ./configure --prefix=
8 | BUILD_COMMAND cd && make -j4
9 | INSTALL_COMMAND cd && make install
10 | )
11 |
12 | ExternalProject_Get_Property(project_libpcre2 install_dir)
13 |
14 | add_library(libpcre2 STATIC IMPORTED)
15 | set_property(TARGET libpcre2 PROPERTY IMPORTED_LOCATION ${install_dir}/lib/libpcre2-8.a)
16 | add_dependencies(libpcre2 project_libpcre2)
17 | ADD_DEPENDENCIES(logkafka_lib project_libpcre2)
18 |
19 | TARGET_LINK_LIBRARIES(logkafka libpcre2)
20 | INCLUDE_DIRECTORIES(${install_dir}/include)
21 |
--------------------------------------------------------------------------------
/modules/Buildlibrdkafka.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "installing librdkafka ...")
2 | CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
3 |
4 | ExternalProject_Add(project_librdkafka
5 | GIT_REPOSITORY https://github.com/edenhill/librdkafka.git
6 | GIT_TAG 0.8.6
7 | PREFIX ${CMAKE_CURRENT_BINARY_DIR}/librdkafka
8 | CONFIGURE_COMMAND cd && ./configure --prefix=
9 | BUILD_COMMAND cd && make
10 | INSTALL_COMMAND cd && make install
11 | )
12 |
13 | ExternalProject_Get_Property(project_librdkafka install_dir)
14 |
15 | #add_library(librdkafka SHARED IMPORTED)
16 | #set_property(TARGET librdkafka PROPERTY IMPORTED_LOCATION ${install_dir}/lib/librdkafka.so)
17 | add_library(librdkafka STATIC IMPORTED)
18 | set_property(TARGET librdkafka PROPERTY IMPORTED_LOCATION ${install_dir}/lib/librdkafka.a)
19 | add_dependencies(librdkafka project_librdkafka)
20 | ADD_DEPENDENCIES(logkafka_lib project_librdkafka)
21 |
22 | TARGET_LINK_LIBRARIES(logkafka librdkafka)
23 | INCLUDE_DIRECTORIES(${install_dir}/include)
24 |
--------------------------------------------------------------------------------
/modules/Buildlibuv.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "installing libuv ...")
2 | CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
3 |
4 | ExternalProject_Add(project_libuv
5 | GIT_REPOSITORY https://github.com/libuv/libuv.git
6 | GIT_TAG v1.6.0
7 | PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libuv
8 | CONFIGURE_COMMAND cd && sh autogen.sh && ./configure --prefix=
9 | BUILD_COMMAND cd && make
10 | INSTALL_COMMAND cd && make install
11 | )
12 |
13 | ExternalProject_Get_Property(project_libuv install_dir)
14 |
15 | #add_library(libuv SHARED IMPORTED)
16 | #set_property(TARGET libuv PROPERTY IMPORTED_LOCATION ${install_dir}/lib/libuv.so)
17 | add_library(libuv STATIC IMPORTED)
18 | set_property(TARGET libuv PROPERTY IMPORTED_LOCATION ${install_dir}/lib/libuv.a)
19 | add_dependencies(libuv project_libuv)
20 | ADD_DEPENDENCIES(logkafka_lib project_libuv)
21 |
22 | TARGET_LINK_LIBRARIES(logkafka libuv)
23 | INCLUDE_DIRECTORIES(${install_dir}/include)
24 |
--------------------------------------------------------------------------------
/modules/Buildlibzookeeper_mt.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "installing libzookeeper_mt ...")
2 | CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
3 |
4 | IF (OS_X_VERSION VERSION_GREATER_EQUAL "10.10")
5 | MESSAGE(STATUS "downloading lib zookeeper patch for Mac OS X ${OS_X_VERSION} ...")
6 | #SET(ZOOKEEPER_PATCH_FILE ${CMAKE_CURRENT_BINARY_DIR}/libzookeeper_mt/ZOOKEEPER-2049.noprefix.trunk.patch)
7 | #SET(ZOOKEEPER_PATCH_URL https://issues.apache.org/jira/secure/attachment/12673212/ZOOKEEPER-2049.noprefix.trunk.patch)
8 | #EXECUTE_PROCESS(WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libzookeeper_mt
9 | # COMMAND wget ${ZOOKEEPER_PATCH_URL} -O ${ZOOKEEPER_PATCH_FILE})
10 | SET(ZOOKEEPER_PATCH_FILE ${PROJECT_SOURCE_DIR}/patches/ZOOKEEPER-2049.noprefix.trunk.patch)
11 | SET(LIBZK_OSX_PATCH_CMD "patch -p0 -N -s < ${ZOOKEEPER_PATCH_FILE} || true")
12 | ELSE (OS_X_VERSION VERSION_GREATER_EQUAL "10.10")
13 | SET(LIBZK_OSX_PATCH_CMD ":") # do nothing
14 | ENDIF (OS_X_VERSION VERSION_GREATER_EQUAL "10.10")
15 |
16 | ExternalProject_Add(project_libzookeeper_mt
17 | URL http://archive.apache.org/dist/zookeeper/zookeeper-3.4.6/zookeeper-3.4.6.tar.gz
18 | PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libzookeeper_mt
19 | PATCH_COMMAND cd && sh -c "${LIBZK_OSX_PATCH_CMD}"
20 | CONFIGURE_COMMAND cd /src/c && ./configure --prefix=
21 | BUILD_COMMAND cd /src/c && make -j4
22 | INSTALL_COMMAND cd /src/c && make install
23 | )
24 |
25 | ExternalProject_Get_Property(project_libzookeeper_mt install_dir)
26 |
27 | add_library(libzookeeper_mt STATIC IMPORTED)
28 | set_property(TARGET libzookeeper_mt PROPERTY IMPORTED_LOCATION ${install_dir}/lib/libzookeeper_mt.a)
29 | add_dependencies(libzookeeper_mt project_libzookeeper_mt)
30 | ADD_DEPENDENCIES(logkafka_lib project_libzookeeper_mt)
31 |
32 | TARGET_LINK_LIBRARIES(logkafka libzookeeper_mt)
33 | INCLUDE_DIRECTORIES(${install_dir}/include)
34 |
--------------------------------------------------------------------------------
/modules/Findlibgcov.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibgcov.cmake...")
2 | FIND_PATH(
3 | LIBGCOV_INCLUDE_DIR
4 | /usr/include/
5 | /usr/local/include/
6 | )
7 |
8 | FIND_LIBRARY(
9 | LIBGCOV_LIBRARIES NAMES libgcov.a gcov
10 | PATHS /usr/lib/ /usr/local/lib/
11 | )
12 |
--------------------------------------------------------------------------------
/modules/Findlibpcre2.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibpcre2.cmake...")
2 | FIND_PATH(
3 | LIBPCRE2_INCLUDE_DIR
4 | pcre2.h
5 | /usr/include/
6 | /usr/local/include
7 | /usr/local/include/pcre2
8 | /usr/local/opt/pcre2/include/pcre2
9 | )
10 |
11 | FIND_LIBRARY(
12 | LIBPCRE2_LIBRARIES NAMES libpcre2-8.a pcre2
13 | PATHS /usr/lib /usr/local/lib /usr/local/opt/pcre2/lib
14 | )
15 |
--------------------------------------------------------------------------------
/modules/Findlibpthread.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibpthread.cmake...")
2 | FIND_PATH(
3 | LIBPTHREAD_INCLUDE_DIR
4 | pthread.h
5 | /usr/include/
6 | /usr/local/include/
7 | )
8 |
9 | FIND_LIBRARY(
10 | LIBPTHREAD_LIBRARIES NAMES pthread
11 | PATHS /usr/lib/ /usr/local/lib/
12 | )
13 |
--------------------------------------------------------------------------------
/modules/Findlibrdkafka.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibrdkafka.cmake...")
2 | FIND_PATH(
3 | LIBRDKAFKA_INCLUDE_DIR
4 | librdkafka/rdkafka.h
5 | /usr/include/
6 | /usr/local/include/
7 | /usr/local/opt/librdkafka/include/
8 | )
9 |
10 | FIND_LIBRARY(
11 | LIBRDKAFKA_LIBRARIES NAMES librdkafka.a rdkafka
12 | PATHS /usr/lib/ /usr/local/lib/ /usr/local/opt/librdkafka/lib/
13 | )
14 |
--------------------------------------------------------------------------------
/modules/Findlibrt.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibrt.cmake...")
2 | FIND_PATH(
3 | LIBRT_INCLUDE_DIR
4 | time.h
5 | /usr/include/
6 | /usr/local/include/
7 | )
8 |
9 | FIND_LIBRARY(
10 | LIBRT_LIBRARIES NAMES rt
11 | PATHS /usr/lib/ /usr/local/lib/
12 | )
13 |
--------------------------------------------------------------------------------
/modules/Findlibuv.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibuv.cmake...")
2 | FIND_PATH(
3 | LIBUV_INCLUDE_DIR
4 | uv.h
5 | /usr/include/
6 | /usr/local/include/uv
7 | )
8 |
9 | FIND_LIBRARY(
10 | LIBUV_LIBRARIES NAMES libuv.a uv
11 | PATHS /usr/lib /usr/local/lib
12 | )
13 |
--------------------------------------------------------------------------------
/modules/Findlibz.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibz.cmake...")
2 | FIND_PATH(
3 | LIBZ_INCLUDE_DIR
4 | zlib.h
5 | /usr/include/
6 | /usr/local/include/
7 | /usr/local/opt/zlib/include/
8 | )
9 |
10 | FIND_LIBRARY(
11 | LIBZ_LIBRARIES NAMES z
12 | PATHS /usr/lib/ /usr/local/lib/ /usr/local/opt/zlib/lib
13 | )
14 |
--------------------------------------------------------------------------------
/modules/Findlibzookeeper_mt.cmake:
--------------------------------------------------------------------------------
1 | MESSAGE(STATUS "Using bundled Findlibzookeeper_mt.cmake...")
2 | FIND_PATH(
3 | LIBZOOKEEPER_MT_INCLUDE_DIR
4 | zookeeper.h
5 | $ENV{LIBZOOKEEPER_INCLUDE_PATH}
6 | /usr/include/zookeeper
7 | /usr/include/
8 | /usr/local/include/
9 | /usr/local/include/zookeeper/
10 | /usr/local/zookeeper/include/zookeeper/
11 | /usr/local/opt/zookeeper/include/zookeeper/
12 | )
13 |
14 | FIND_LIBRARY(
15 | LIBZOOKEEPER_MT_LIBRARIES NAMES libzookeeper_mt.a zookeeper_mt
16 | PATHS $ENV{LIBZOOKEEPER_LIB_PATH} /usr/lib/ /usr/local/lib/ /usr/local/zookeeper/lib/ /usr/local/opt/zookeeper/lib/
17 | )
18 |
--------------------------------------------------------------------------------
/src/base/Property.h:
--------------------------------------------------------------------------------
1 | // Some utility templates for emulating
2 | // properties - preferring a library solution
3 | // to a new language feature
4 | // Each property has three sets of redundant
5 | // acccessors:
6 | // 1. function call syntax
7 | // 2. get() and set() functions
8 | // 3. overloaded operator =
9 |
10 | // a read-write property with data store and
11 | // automatically generated get/set functions.
12 | // this is what C++/CLI calls a trivial scalar
13 | // property
14 | template
15 | class Property {
16 | T data;
17 | public:
18 |
19 | // access with function call syntax
20 | Property() : data() { }
21 | T operator()() const {
22 | return data;
23 | }
24 | T operator()(T const & value) {
25 | data = value;
26 | return data;
27 | }
28 |
29 | // access with get()/set() syntax
30 | T get() const {
31 | return data;
32 | }
33 | T set(T const & value) {
34 | data = value;
35 | return data;
36 | }
37 |
38 | // access with '=' sign
39 | // in an industrial-strength library,
40 | // specializations for appropriate types
41 | // might choose to add combined operators
42 | // like +=, etc.
43 | operator T() const {
44 | return data;
45 | }
46 | T operator=(T const & value) {
47 | data = value;
48 | return data;
49 | }
50 | typedef T value_type;
51 | // might be useful for template
52 | // deductions
53 | };
54 |
--------------------------------------------------------------------------------
/src/base/ROProperty.h:
--------------------------------------------------------------------------------
1 | // a read-only property calling a
2 | // user-defined getter
3 | template
5 | class ROProperty {
6 | Object * my_object;
7 | public:
8 | ROProperty() : my_object(0) {}
9 | ROProperty(Object * me)
10 | : my_object(me) {}
11 |
12 | // this function must be called by the
13 | // containing class, normally in a
14 | // constructor, to initialize the
15 | // ROProperty so it knows where its
16 | // real implementation code can be
17 | // found.
18 | // obj is usually the containing
19 | // class, but need not be; it could be a
20 | // special implementation object.
21 | void operator()(Object * obj) {
22 | my_object = obj;
23 | }
24 |
25 | // function call syntax
26 | T operator()() const {
27 | return (my_object->*real_getter)();
28 | }
29 |
30 | // get/set syntax
31 | T get() const {
32 | return (my_object->*real_getter)();
33 | }
34 | void set(T const & value);
35 | // reserved but not implemented,
36 | // per C++/CLI
37 |
38 | // use on rhs of '='
39 | operator T() const {
40 | return (my_object->*real_getter)();
41 | }
42 |
43 | typedef T value_type;
44 | // might be useful for template
45 | // deductions
46 | };
47 |
48 |
--------------------------------------------------------------------------------
/src/base/RWProperty.h:
--------------------------------------------------------------------------------
1 | // a read-write property which invokes
2 | // user-defined functions
3 | template
7 | class RWProperty {
8 | Object * my_object;
9 | public:
10 | RWProperty() : my_object(0) {}
11 | RWProperty(Object * me)
12 | : my_object(me) {}
13 |
14 | // this function must be called by the
15 | // containing class, normally in a
16 | // constructor, to initialize the
17 | // ROProperty so it knows where its
18 | // real implementation code can be
19 | // found
20 | void operator()(Object * obj) {
21 | my_object = obj;
22 | }
23 |
24 | // function call syntax
25 | T operator()() const {
26 | return (my_object->*real_getter)();
27 | }
28 | T operator()(T const & value) {
29 | return (my_object->*real_setter)(value);
30 | }
31 |
32 | // get/set syntax
33 | T get() const {
34 | return (my_object->*real_getter)();
35 | }
36 | T set(T const & value) {
37 | return (my_object->*real_setter)(value);
38 | }
39 | // access with '=' sign
40 | operator T() const {
41 | return (my_object->*real_getter)();
42 | }
43 | T operator=(T const & value) {
44 | return (my_object->*real_setter)(value);
45 | }
46 |
47 | typedef T value_type;
48 | // might be useful for template
49 | // deductions
50 | };
51 |
--------------------------------------------------------------------------------
/src/base/WOProperty.h:
--------------------------------------------------------------------------------
1 | // a write-only property calling a
2 | // user-defined setter
3 | template
5 | class WOProperty {
6 | Object * my_object;
7 | public:
8 | WOProperty() : my_object(0) {}
9 | WOProperty(Object * me)
10 | : my_object(me) {}
11 |
12 | // this function must be called by the
13 | // containing class, normally in a
14 | // constructor, to initialize the
15 | // WOProperty so it knows where its real
16 | // implementation code can be found
17 | void operator()(Object * obj) {
18 | my_object = obj;
19 | }
20 | // function call syntax
21 | T operator()(T const & value) {
22 | return (my_object->*real_setter)(value);
23 | }
24 | // get/set syntax
25 | T get() const;
26 | // reserved but not implemented,
27 | // per C++/CLI
28 | T set(T const & value) {
29 | return (my_object->*real_setter)(value);
30 | }
31 |
32 | // access with '=' sign
33 | T operator=(T const & value) {
34 | return (my_object->*real_setter)(value);
35 | }
36 |
37 | typedef T value_type;
38 | // might be useful for template
39 | // deductions
40 | };
41 |
--------------------------------------------------------------------------------
/src/base/common.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef BASE_COMMON_H_
23 | #define BASE_COMMON_H_
24 |
25 | #define INO_NONE 0
26 | #define FD_NONE -1
27 |
28 | #endif // BASE_COMMON_H_
29 |
--------------------------------------------------------------------------------
/src/base/mutex.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef BASE_MUTEX_H_
23 | #define BASE_MUTEX_H_
24 |
25 | #include
26 | #include
27 |
28 | namespace base {
29 |
30 | class Mutex
31 | {
32 | public:
33 | Mutex()
34 | {
35 | if ((pthread_mutex_init(&m_lock, NULL) != 0)) {
36 | throw "init spin lock failed!!!";
37 | }
38 | }
39 |
40 | ~Mutex()
41 | {
42 | pthread_mutex_destroy(&m_lock);
43 | }
44 |
45 | void lock()
46 | {
47 | pthread_mutex_lock(&m_lock);
48 | }
49 |
50 | void unlock()
51 | {
52 | pthread_mutex_unlock(&m_lock);
53 | }
54 |
55 | pthread_mutex_t& mutex()
56 | {
57 | return m_lock;
58 | }
59 |
60 | private:
61 | pthread_mutex_t m_lock;
62 | };
63 |
64 | } // namespace base
65 |
66 | #endif // BASE_MUTEX_H_
67 |
--------------------------------------------------------------------------------
/src/base/noncopyable.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef BASE_NONCOPYABLE_H_
23 | #define BASE_NONCOPYABLE_H_
24 |
25 | namespace base {
26 |
27 | // Private copy constructor and copy assignment ensure classes derived from
28 | // class noncopyable cannot be copied.
29 |
30 | // Contributed by Dave Abrahams
31 |
32 | namespace noncopyable_ // protection from unintended ADL
33 | {
34 | class noncopyable
35 | {
36 | protected:
37 | noncopyable() {}
38 | ~noncopyable() {}
39 | private: // emphasize the following members are private
40 | noncopyable( const noncopyable& );
41 | const noncopyable& operator=( const noncopyable& );
42 | };
43 | }
44 |
45 | typedef noncopyable_::noncopyable noncopyable;
46 |
47 | } // namespace base
48 |
49 | #endif // BASE_NONCOPYABLE_H_
50 |
--------------------------------------------------------------------------------
/src/base/singleton.h:
--------------------------------------------------------------------------------
1 | #ifndef BASE_SINGLETON_H_
2 | #define BASE_SINGLETON_H_
3 |
4 | #include
5 | #include "base/noncopyable.h"
6 |
7 | namespace base {
8 |
9 | template
10 | class Singleton : base::noncopyable {
11 | public:
12 | static T& instance() {
13 | pthread_once(&ponce_, &Singleton::init);
14 | return *value_;
15 | }
16 |
17 | static void init() {
18 | value_ = new T();
19 | }
20 | private:
21 | static pthread_once_t ponce_;
22 | static T* value_;
23 | };
24 |
25 | template
26 | pthread_once_t Singleton::ponce_ = PTHREAD_ONCE_INIT;
27 |
28 | template
29 | T* Singleton::value_ = NULL;
30 |
31 | } // namespace base
32 |
33 | #endif // BASE_SINGLETON_H_
34 |
--------------------------------------------------------------------------------
/src/logkafka/filter.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_FILTER_H_
23 | #define LOGKAFKA_FILTER_H_
24 |
25 | #include
26 | #include
27 |
28 | using namespace std;
29 |
30 | namespace logkafka {
31 |
32 | class Filter
33 | {
34 | public:
35 | Filter() {};
36 | virtual ~Filter() {};
37 | virtual bool init(void *arg) = 0;
38 | virtual bool filter(void *arg, vector &lines) = 0;
39 | };
40 |
41 | } // namespace logkafka
42 |
43 | #endif // LOGKAFKA_FILTER_H_
44 |
--------------------------------------------------------------------------------
/src/logkafka/filter_regex.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_FILTER_REGEX_H_
23 | #define LOGKAFKA_FILTER_REGEX_H_
24 |
25 | #include
26 | #include
27 |
28 | #include "logkafka/filter.h"
29 | #include "logkafka/task_conf.h"
30 |
31 | #include "pcre2.h"
32 |
33 | using namespace std;
34 |
35 | namespace logkafka {
36 |
37 | class FilterRegex: public virtual Filter
38 | {
39 | public:
40 | FilterRegex(): Filter() {};
41 | FilterRegex(FilterConf filter_conf):
42 | m_filter_conf(filter_conf) { m_re = NULL; };
43 | virtual ~FilterRegex() {
44 | pcre2_code_free(m_re); m_re = NULL;
45 | };
46 | bool init(void *arg);
47 | bool filter(void *arg, vector &lines);
48 |
49 | private:
50 | FilterConf m_filter_conf;
51 | pcre2_code *m_re;
52 | };
53 |
54 | } // namespace logkafka
55 |
56 | #endif // LOGKAFKA_FILTER_REGEX_H_
57 |
--------------------------------------------------------------------------------
/src/logkafka/logkafka.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_H_
23 | #define LOGKAFKA_H_
24 |
25 | #include "base/timer_watcher.h"
26 | #include "logkafka/config.h"
27 | #include "logkafka/manager.h"
28 | #include "logkafka/signal_handler.h"
29 |
30 | using namespace std;
31 | using namespace base;
32 |
33 | namespace logkafka {
34 |
35 | class LogKafka
36 | {
37 | public:
38 | LogKafka() {};
39 | explicit LogKafka(const Config *config);
40 | ~LogKafka();
41 |
42 | bool init();
43 | void close();
44 | bool start();
45 | void stop();
46 |
47 | static void onSignal(void *arg);
48 | static void exitAsyncCb(uv_async_t* handle);
49 |
50 | private:
51 | Manager *m_manager;
52 | uv_loop_t *m_loop;
53 | SignalHandler *m_signal_handler;
54 | TimerWatcher *m_upload_timer_trigger;
55 |
56 | const Config *m_config;
57 | uv_async_t m_exit_handle;
58 | };
59 |
60 | } // namespace logkafka
61 |
62 | #endif // LOGKAFKA_H_
63 |
--------------------------------------------------------------------------------
/src/logkafka/memory_position_entry.cc:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #include "logkafka/memory_position_entry.h"
23 |
24 | namespace logkafka {
25 |
26 | bool MemoryPositionEntry::update(ino_t inode, off_t pos)
27 | {/*{{{*/
28 | m_inode = inode;
29 | m_pos = pos;
30 |
31 | return true;
32 | }/*}}}*/
33 |
34 | bool MemoryPositionEntry::updatePos(off_t pos)
35 | {/*{{{*/
36 | m_pos = pos;
37 |
38 | return true;
39 | }/*}}}*/
40 |
41 | ino_t MemoryPositionEntry::readInode()
42 | {/*{{{*/
43 | return m_inode;
44 | }/*}}}*/
45 |
46 | off_t MemoryPositionEntry::readPos()
47 | {/*{{{*/
48 | return m_pos;
49 | }/*}}}*/
50 |
51 | } // namespace logkafka
52 |
--------------------------------------------------------------------------------
/src/logkafka/memory_position_entry.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_MEMORY_POSITION_ENTRY_H_
23 | #define LOGKAFKA_MEMORY_POSITION_ENTRY_H_
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 | #include
32 |
33 | #include "base/common.h"
34 | #include "logkafka/position_entry.h"
35 |
36 | using namespace std;
37 |
38 | namespace logkafka {
39 |
40 | class MemoryPositionEntry: public virtual PositionEntry
41 | {
42 | public:
43 | MemoryPositionEntry(): PositionEntry() {};
44 | bool init(ino_t inode, off_t pos);
45 | bool update(ino_t inode, off_t pos);
46 | bool updatePos(off_t pos);
47 | ino_t readInode();
48 | off_t readPos();
49 |
50 | private:
51 | ino_t m_inode;
52 | off_t m_pos;
53 | };
54 |
55 | } // namespace logkafka
56 |
57 | #endif // LOGKAFKA_MEMORY_POSITION_ENTRY_H_
58 |
--------------------------------------------------------------------------------
/src/logkafka/option.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_OPTION_H_
23 | #define LOGKAFKA_OPTION_H_
24 |
25 | #include
26 |
27 | using namespace std;
28 |
29 | namespace logkafka {
30 |
31 | class Option
32 | {
33 | public:
34 | Option();
35 | Option(int argc, char *argv[]);
36 | void parseArgs(int argc, char *argv[], Option &option);
37 |
38 | public:
39 | string logkafka_config_path;
40 | string easylogging_config_path;
41 | bool daemon;
42 | };
43 |
44 | } // namespace logkafka
45 |
46 | #endif // LOGKAFKA_OPTION_H_
47 |
--------------------------------------------------------------------------------
/src/logkafka/output.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_OUTPUT_H_
23 | #define LOGKAFKA_OUTPUT_H_
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 | #include
32 |
33 | #include "base/common.h"
34 |
35 | using namespace std;
36 |
37 | namespace logkafka {
38 |
39 | class Output
40 | {
41 | public:
42 | Output() {};
43 | virtual ~Output() {};
44 | virtual bool init(void *arg) = 0;
45 | virtual bool output(void *arg,
46 | const vector &lines,
47 | vector &unsent_lines) = 0;
48 | };
49 |
50 | } // namespace logkafka
51 |
52 | #endif // LOGKAFKA_OUTPUT_H_
53 |
--------------------------------------------------------------------------------
/src/logkafka/position_entry.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_POSITION_ENTRY_H_
23 | #define LOGKAFKA_POSITION_ENTRY_H_
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | #include
30 | #include
31 | #include
32 |
33 | #include "base/common.h"
34 |
35 | using namespace std;
36 |
37 | namespace logkafka {
38 |
39 | class PositionEntry
40 | {
41 | public:
42 | PositionEntry() {};
43 | virtual ~PositionEntry() {};
44 | virtual bool update(ino_t inode, off_t pos) = 0;
45 | virtual bool updatePos(off_t pos) = 0;
46 | virtual ino_t readInode() = 0;
47 | virtual off_t readPos() = 0;
48 | };
49 |
50 | } // namespace logkafka
51 |
52 | #endif // LOGKAFKA_POSITION_ENTRY_H_
53 |
--------------------------------------------------------------------------------
/src/logkafka/properties.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_PROPERTIES_H_
23 | #define LOGKAFKA_PROPERTIES_H_
24 |
25 | #include
26 |
27 | using namespace std;
28 |
29 | namespace logkafka {
30 |
31 | class Properties
32 | {
33 | public:
34 | string logkafka_config_path;
35 | string easylogging_config_path;
36 | };
37 |
38 | } // namespace logkafka
39 |
40 | #endif // LOGKAFKA_PROPERTIES_H_
41 |
--------------------------------------------------------------------------------
/src/logkafka/signal_handler.h:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////
2 | //
3 | // logkafka - Collect logs and send lines to Apache Kafka v0.8+
4 | //
5 | ///////////////////////////////////////////////////////////////////////////
6 | //
7 | // Copyright (c) 2015 Qihoo 360 Technology Co., Ltd. All rights reserved.
8 | //
9 | // Licensed under the MIT License, Version 2.0 (the "License");
10 | // you may not use this file except in compliance with the License.
11 | // You may obtain a copy of the License at
12 | //
13 | // http://opensource.org/licenses/MIT
14 | //
15 | // Unless required by applicable law or agreed to in writing, software
16 | // distributed under the License is distributed on an "AS IS" BASIS,
17 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 | // See the License for the specific language governing permissions and
19 | // limitations under the License.
20 | //
21 | ///////////////////////////////////////////////////////////////////////////
22 | #ifndef LOGKAFKA_SIGNAL_HANDLER_H_
23 | #define LOGKAFKA_SIGNAL_HANDLER_H_
24 |
25 | #include
26 |
27 | #include
28 | #include
29 | #include
30 |
31 | #include "base/tools.h"
32 |
33 | #include "easylogging/easylogging++.h"
34 |
35 | #include
36 |
37 | using namespace std;
38 |
39 | namespace logkafka {
40 |
41 | typedef void (*SignalFunc)(void *);
42 |
43 | class SignalHandler
44 | {
45 | public:
46 | SignalHandler() {};
47 | bool init(uv_loop_t *loop,
48 | int signum,
49 | void *signal_func_arg,
50 | SignalFunc on_signal);
51 |
52 | private:
53 | static void default_cb(uv_signal_t* handle, int signum);
54 | SignalFunc m_signal_func;
55 | void *m_signal_func_arg;
56 | uv_signal_t m_handle;
57 | };
58 |
59 | } // namespace logkafka
60 |
61 | #endif // LOGKAFKA_SIGNAL_HANDLER_H_
62 |
--------------------------------------------------------------------------------
/src/third_party/confuse/.cvsignore:
--------------------------------------------------------------------------------
1 | .gdb_history
2 | aclocal.m4
3 | autom4te.cache
4 | config.h
5 | config.h.in
6 | config.log
7 | config.status
8 | configure
9 | confuse-config
10 | Doxyfile
11 | libconfuse.pc
12 | libconfuse.spec
13 | libtool
14 | libtool.patch
15 | Makefile
16 | Makefile.in
17 | stamp-h1
18 |
--------------------------------------------------------------------------------
/src/third_party/confuse/AUTHORS:
--------------------------------------------------------------------------------
1 | Martin Hedenfalk
2 |
3 | Josh Myer fixed a buffer-checking FIXME
4 |
--------------------------------------------------------------------------------
/src/third_party/confuse/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(src .)
2 | aux_source_directory(src DIR_LIB_SRCS)
3 | add_library (confuse ${DIR_LIB_SRCS})
4 |
5 | set(package_version, '2.7')
6 | add_definitions(-DPACKAGE_VERSION="${package_version}")
7 | set(package_string, 'libConfuse 2.7')
8 | add_definitions(-DPACKAGE_STRING="${package_string}")
9 | add_definitions(-DHAVE_STRDUP)
10 | add_definitions(-DHAVE_STRNDUP)
11 |
12 | IF (OS_X_VERSION VERSION_GREATER "10.10")
13 | add_definitions(-DHAVE_UNISTD_H)
14 | ENDIF (OS_X_VERSION VERSION_GREATER "10.10")
15 |
--------------------------------------------------------------------------------
/src/third_party/confuse/README:
--------------------------------------------------------------------------------
1 | This is libConfuse, a library for parsing configuration files. It was
2 | called libcfg before, but was changed to not confuse with other
3 | similar libraries.
4 |
5 | See the INSTALL file for installation instructions. By default, only a
6 | static library is built. Specify --enable-shared to the configure
7 | script to also build a shared library.
8 |
9 | With libtool 1.4.2 (and/or automake 1.6.3) there is a problem building
10 | the sources. The libtool script expects the environment variable SED
11 | to point to a usable sed binary, but this variable does not get
12 | set. You'll have to do a "export SED=sed" (if using bash) or "setenv
13 | SED sed" (if using csh) before running make.
14 |
15 | Documentation can be built by running doxygen in the top-level
16 | directory. It is also available at http://www.nongnu.org/confuse/manual/.
17 |
18 | There is a project page at http://sv.nongnu.org/projects/confuse.
19 | Report bugs to
20 |
21 |
--------------------------------------------------------------------------------
/src/third_party/confuse/autogen.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo -n "Running autopoint..."
4 | autopoint && echo " done"
5 | rm -f ABOUT-NLS
6 |
7 | echo -n "Running aclocal..."
8 | aclocal -I m4 || exit
9 | echo " done"
10 |
11 | echo -n "Running autoconf..."
12 | autoconf || exit
13 | echo " done"
14 |
15 | echo -n "Running autoheader..."
16 | autoheader || exit
17 | echo " done"
18 |
19 | echo -n "Running libtoolize..."
20 | libtoolize --automake || glibtoolize --automake || exit
21 | echo " done"
22 |
23 | echo -n "Running automake..."
24 | automake --add-missing || exit
25 | echo " done"
26 |
27 | echo "Running configure $*..."
28 | ./configure --enable-maintainer-mode $*
29 |
30 |
--------------------------------------------------------------------------------
/src/third_party/confuse/configure.ac:
--------------------------------------------------------------------------------
1 | dnl Process this file with -*- autoconf -*- to produce a configure script.
2 |
3 | AC_PREREQ(2.50)
4 |
5 | AC_INIT(libConfuse, 2.7, confuse-devel@nongnu.org, confuse)
6 | AC_CONFIG_AUX_DIR(support)
7 | AM_MAINTAINER_MODE
8 | AM_INIT_AUTOMAKE
9 | AM_CONFIG_HEADER(config.h)
10 | AC_CONFIG_SRCDIR(src/confuse.c)
11 |
12 | # Checks for programs.
13 | # disable unnecessary compiler checks
14 | AC_DEFUN([AC_PROG_F77], [:])
15 | AC_DEFUN([AC_PROG_FC], [:])
16 | AC_DEFUN([AC_PROG_CXX], [:])
17 | AC_DEFUN([AC_PROG_CXXCPP], [:])
18 | AC_DEFUN([AC_PROG_OBJC], [:])
19 | AC_DEFUN([AC_PROG_OBJCCPP], [:])
20 | AC_DEFUN([AC_LIBTOOL_CXX], [:])
21 | AC_DEFUN([AC_LIBTOOL_F77], [:])
22 | AC_PROG_CC
23 | AM_PROG_LEX
24 | AC_DISABLE_SHARED
25 | AC_PROG_LIBTOOL
26 |
27 | # optional building of examples:
28 | AC_ARG_ENABLE([examples],
29 | [AC_HELP_STRING([--disable-examples], [don't build examples in examples])],
30 | [], [enable_examples=yes])
31 | AM_CONDITIONAL([ENABLE_EXAMPLES], [test "$enable_examples" = yes])
32 |
33 | AM_GNU_GETTEXT([external])
34 | AM_GNU_GETTEXT_VERSION([0.16.1])
35 |
36 | # Checks for header files.
37 | AC_HEADER_STDC
38 | AC_CHECK_HEADERS([unistd.h])
39 |
40 | # Checks for typedefs, structures, and compiler characteristics.
41 | AC_C_CONST
42 |
43 | # Checks for library functions.
44 | AC_CHECK_FUNCS([strcasecmp strdup strndup])
45 |
46 | dnl Check for the library containing inet_aton/inet_ntoa (for tests)
47 | AC_SEARCH_LIBS([inet_ntoa], [socket nsl])
48 |
49 | AC_CONFIG_FILES([Makefile \
50 | src/Makefile \
51 | examples/Makefile \
52 | po/Makefile.in \
53 | m4/Makefile \
54 | tests/Makefile \
55 | doc/Makefile \
56 | doc/Doxyfile \
57 | libconfuse.pc \
58 | libconfuse.spec])
59 | AC_OUTPUT
60 |
61 |
--------------------------------------------------------------------------------
/src/third_party/confuse/doc/.cvsignore:
--------------------------------------------------------------------------------
1 | .gdb_history
2 | conf.d
3 | html
4 | listing1.xml
5 | listing2.xml
6 | listing3.xml
7 | listing4.xml
8 | listing5.xml
9 | listing6.xml
10 | listing7.xml
11 | listing8.xml
12 | Makefile
13 | Makefile.in
14 | man
15 | tutorial
16 | tutorial-html
17 | tutorial-source
18 | valid.c
19 | .Makefile.am.swp
20 | tutorial-build.timestamp
21 | Doxyfile
22 |
--------------------------------------------------------------------------------
/src/third_party/confuse/doc/Makefile.am:
--------------------------------------------------------------------------------
1 | EXTRA_DIST = doxygen-footer.html doxygen-header.html doxygen.css tutorial.xml \
2 | $(TUTORIAL_CSOURCES) css.xsl tutorial.css Doxyfile.in Doxyfile
3 |
4 | # I'd like to have these programs only compile at 'make documentation' time.
5 | # How?
6 | # noinst_PROGRAMS = listing1 listing2 listing3 listing4 listing5 listing8
7 | LDADD = ../src/libconfuse.la
8 | INCLUDES = -I$(top_srcdir)/src
9 | AM_LDFLAGS = -L../src/
10 | LIBS = $(LTLIBINTL)
11 |
12 | TUTORIAL_CSOURCES = listing1.c listing2.c listing3.c listing4.c \
13 | listing5.c listing6.c listing7.c listing8.c
14 | TUTORIAL_LISTINGS = $(TUTORIAL_CSOURCES:.c=.xml)
15 |
16 | .c.xml:
17 | echo " $@
18 | sed = $< | sed 'N;s/\n/\t/' >> $@
19 | echo ']]>' >> $@
20 |
21 | tutorial-html/index.html: tutorial.xml $(TUTORIAL_LISTINGS) css.xsl tutorial.css
22 | xmllint --valid --noout $< && xmlto -o tutorial-html --extensions -m css.xsl xhtml $<
23 | cp -f tutorial.css tutorial-html/
24 |
25 | tutorial.pdf: tutorial.xml $(TUTORIAL_LISTINGS)
26 | xmllint --valid --noout $< && xmlto pdf $<
27 |
28 | tutorial: tutorial-html
29 | tutorial-html: tutorial-html/index.html
30 | tutorial-pdf: tutorial.pdf
31 |
32 | html/index.html: Doxyfile
33 | doxygen
34 | doxygen-manual: html/index.html ../src/confuse.h
35 |
36 | documentation: tutorial doxygen-manual
37 |
38 | dist-hook: tutorial doxygen-manual
39 | cp -pr html $(distdir)
40 | cp -pr man $(distdir)
41 | cp -pr tutorial-html $(distdir)
42 |
43 | CLEANFILES=*~ '\#*\#' $(TUTORIAL_LISTINGS)
44 | DISTCLEANFILES=
45 | MOSTLYCLEANFILES=tutorial.pdf
46 |
47 | celan: clean
48 |
49 |
--------------------------------------------------------------------------------
/src/third_party/confuse/doc/css.xsl:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/third_party/confuse/doc/doxygen-footer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |