mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Mask secrets in log
This commit is contained in:
parent
894b654f93
commit
1073626f8e
@ -29,7 +29,10 @@ void ASTAlterNamedCollectionQuery::formatImpl(const IAST::FormatSettings & setti
|
||||
first = false;
|
||||
|
||||
formatSettingName(change.name, settings.ostr);
|
||||
settings.ostr << " = " << applyVisitor(FieldVisitorToString(), change.value);
|
||||
if (settings.show_secrets)
|
||||
settings.ostr << " = " << applyVisitor(FieldVisitorToString(), change.value);
|
||||
else
|
||||
settings.ostr << " = '[HIDDEN]'";
|
||||
}
|
||||
}
|
||||
if (!delete_keys.empty())
|
||||
|
@ -32,7 +32,11 @@ void ASTCreateNamedCollectionQuery::formatImpl(const IAST::FormatSettings & sett
|
||||
first = false;
|
||||
|
||||
formatSettingName(change.name, settings.ostr);
|
||||
settings.ostr << " = " << applyVisitor(FieldVisitorToString(), change.value);
|
||||
|
||||
if (settings.show_secrets)
|
||||
settings.ostr << " = " << applyVisitor(FieldVisitorToString(), change.value);
|
||||
else
|
||||
settings.ostr << " = '[HIDDEN]'";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace DB
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int NAMED_COLLECTION_ALREADY_EXISTS;
|
||||
extern const int NAMED_COLLECTION_DOESNT_EXISTS;
|
||||
extern const int NAMED_COLLECTION_DOESNT_EXIST;
|
||||
extern const int BAD_ARGUMENTS;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ public:
|
||||
if (!removeIfExists(collection_name))
|
||||
{
|
||||
throw Exception(
|
||||
ErrorCodes::NAMED_COLLECTION_DOESNT_EXISTS,
|
||||
ErrorCodes::NAMED_COLLECTION_DOESNT_EXIST,
|
||||
"Cannot remove collection `{}`, because it doesn't exist",
|
||||
collection_name);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user