mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Zlib: as submodule, fix compile options; config: add logger options: logger.flush logger.rotateOnOpen
This commit is contained in:
parent
44b8cc2292
commit
411202d5ad
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -16,3 +16,6 @@
|
||||
[submodule "contrib/cctz"]
|
||||
path = contrib/cctz
|
||||
url = https://github.com/google/cctz.git
|
||||
[submodule "contrib/zlib-ng"]
|
||||
path = contrib/zlib-ng
|
||||
url = https://github.com/Dead2/zlib-ng.git
|
||||
|
6
contrib/CMakeLists.txt
vendored
6
contrib/CMakeLists.txt
vendored
@ -45,7 +45,11 @@ if (USE_INTERNAL_UNWIND_LIBRARY)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_ZLIB_LIBRARY)
|
||||
add_subdirectory (libzlib-ng)
|
||||
add_subdirectory (zlib-ng)
|
||||
# todo: make pull to Dead2/zlib-ng and remove:
|
||||
# We should use same defines when including zlib.h as used when zlib compiled
|
||||
target_compile_definitions (zlib PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
||||
target_compile_definitions (zlibstatic PUBLIC ZLIB_COMPAT WITH_GZFILEOP)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_CCTZ_LIBRARY)
|
||||
|
1
contrib/zlib-ng
vendored
Submodule
1
contrib/zlib-ng
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e07a52dbaa35d003f5659b221b29d220c091667b
|
@ -3,10 +3,10 @@
|
||||
#include <Poco/Notification.h>
|
||||
#include <Poco/NotificationQueue.h>
|
||||
#include <Poco/Timestamp.h>
|
||||
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <functional>
|
||||
|
@ -605,11 +605,13 @@ void BaseDaemon::buildLoggers()
|
||||
pf->setProperty("times", "local");
|
||||
Poco::AutoPtr<FormattingChannel> log = new FormattingChannel(pf);
|
||||
log_file = new FileChannel;
|
||||
log_file->setProperty("path", Poco::Path(config().getString("logger.log")).absolute().toString());
|
||||
log_file->setProperty("rotation", config().getRawString("logger.size", "100M"));
|
||||
log_file->setProperty("archive", "number");
|
||||
log_file->setProperty("compress", config().getRawString("logger.compress", "true"));
|
||||
log_file->setProperty("purgeCount", config().getRawString("logger.count", "1"));
|
||||
log_file->setProperty(Poco::FileChannel::PROP_PATH, Poco::Path(config().getString("logger.log")).absolute().toString());
|
||||
log_file->setProperty(Poco::FileChannel::PROP_ROTATION, config().getRawString("logger.size", "100M"));
|
||||
log_file->setProperty(Poco::FileChannel::PROP_ARCHIVE, "number");
|
||||
log_file->setProperty(Poco::FileChannel::PROP_COMPRESS, config().getRawString("logger.compress", "true"));
|
||||
log_file->setProperty(Poco::FileChannel::PROP_PURGECOUNT, config().getRawString("logger.count", "1"));
|
||||
log_file->setProperty(Poco::FileChannel::PROP_FLUSH, config().getRawString("logger.flush", "true"));
|
||||
log_file->setProperty(Poco::FileChannel::PROP_ROTATEONOPEN, config().getRawString("logger.rotateOnOpen", "false"));
|
||||
log->setChannel(log_file);
|
||||
split->addChannel(log);
|
||||
log_file->open();
|
||||
@ -623,11 +625,13 @@ void BaseDaemon::buildLoggers()
|
||||
pf->setProperty("times", "local");
|
||||
Poco::AutoPtr<FormattingChannel> errorlog = new FormattingChannel(pf);
|
||||
error_log_file = new FileChannel;
|
||||
error_log_file->setProperty("path", Poco::Path(config().getString("logger.errorlog")).absolute().toString());
|
||||
error_log_file->setProperty("rotation", config().getRawString("logger.size", "100M"));
|
||||
error_log_file->setProperty("archive", "number");
|
||||
error_log_file->setProperty("compress", config().getRawString("logger.compress", "true"));
|
||||
error_log_file->setProperty("purgeCount", config().getRawString("logger.count", "1"));
|
||||
error_log_file->setProperty(Poco::FileChannel::PROP_PATH, Poco::Path(config().getString("logger.errorlog")).absolute().toString());
|
||||
error_log_file->setProperty(Poco::FileChannel::PROP_ROTATION, config().getRawString("logger.size", "100M"));
|
||||
error_log_file->setProperty(Poco::FileChannel::PROP_ARCHIVE, "number");
|
||||
error_log_file->setProperty(Poco::FileChannel::PROP_COMPRESS, config().getRawString("logger.compress", "true"));
|
||||
error_log_file->setProperty(Poco::FileChannel::PROP_PURGECOUNT, config().getRawString("logger.count", "1"));
|
||||
error_log_file->setProperty(Poco::FileChannel::PROP_FLUSH, config().getRawString("logger.flush", "true"));
|
||||
error_log_file->setProperty(Poco::FileChannel::PROP_ROTATEONOPEN, config().getRawString("logger.rotateOnOpen", "false"));
|
||||
errorlog->setChannel(error_log_file);
|
||||
level->setChannel(errorlog);
|
||||
split->addChannel(level);
|
||||
|
Loading…
Reference in New Issue
Block a user