ClickHouse/utils/config-processor/config-processor.cpp
proller d6a1f8470f CLICKHOUSE-3553 Rebuild loggers on every config change (#1973)
* Macos test fix

* Fix freebsd build

* CLICKHOUSE-3553 Rebuild loggers on every config change

* rename clickhouse_common_configprocessor -> clickhouse_common_config; move Server/ConfigReloader.cpp -> Common/Config/

* CLICKHOUSE-3553 Set new level to all loggers on reload

* Dont use hash

* Update BaseDaemon.h
2018-02-28 23:34:25 +03:00

36 lines
809 B
C++

#include <Common/Config/ConfigProcessor.h>
#include <iostream>
int main(int argc, char ** argv)
{
try
{
if (argc != 2)
{
std::cerr << "usage: " << argv[0] << " path" << std::endl;
return 3;
}
ConfigProcessor processor(argv[1], false, true);
XMLDocumentPtr document = processor.processConfig();
Poco::XML::DOMWriter().writeNode(std::cout, document);
}
catch (Poco::Exception & e)
{
std::cerr << "Exception: " << e.displayText() << std::endl;
return 1;
}
catch (std::exception & e)
{
std::cerr << "std::exception: " << e.what() << std::endl;
return 3;
}
catch (...)
{
std::cerr << "Some exception" << std::endl;
return 2;
}
return 0;
}