2022-11-14 08:59:53 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2024-05-08 23:08:33 +00:00
|
|
|
enum class ExternalCommandStderrReaction : uint8_t
|
2022-11-14 08:59:53 +00:00
|
|
|
{
|
|
|
|
NONE, /// Do nothing.
|
2023-08-11 14:53:55 +00:00
|
|
|
LOG, /// Try to log all outputs of stderr from the external command immediately.
|
|
|
|
LOG_FIRST, /// Try to log first 1_KiB outputs of stderr from the external command after exit.
|
|
|
|
LOG_LAST, /// Same as above, but log last 1_KiB outputs.
|
|
|
|
THROW /// Immediately throw exception when the external command outputs something to its stderr.
|
2022-11-14 08:59:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ExternalCommandStderrReaction parseExternalCommandStderrReaction(const std::string & config);
|
|
|
|
|
|
|
|
}
|