Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/proxy-wasm/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ struct PluginBase {
std::string_view runtime, std::string_view plugin_configuration, bool fail_open)
: name_(std::string(name)), root_id_(std::string(root_id)), vm_id_(std::string(vm_id)),
runtime_(std::string(runtime)), plugin_configuration_(plugin_configuration),
fail_open_(fail_open), key_(root_id_ + "||" + plugin_configuration_) {}
fail_open_(fail_open), key_(root_id_ + "||" + plugin_configuration_),
log_prefix_(makeLogPrefix()) {}

const std::string name_;
const std::string root_id_;
Expand Down
4 changes: 2 additions & 2 deletions src/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ std::string PluginBase::makeLogPrefix() const {
if (!root_id_.empty()) {
prefix = prefix + " " + std::string(root_id_);
}
if (vm_id_.empty()) {
if (!vm_id_.empty()) {
prefix = prefix + " " + std::string(vm_id_);
}
return prefix;
Expand Down Expand Up @@ -134,7 +134,7 @@ std::string ContextBase::makeRootLogPrefix(std::string_view vm_id) const {
if (!root_id_.empty()) {
prefix = prefix + " " + std::string(root_id_);
}
if (vm_id.empty()) {
if (!vm_id.empty()) {
prefix = prefix + " " + std::string(vm_id);
}
return prefix;
Expand Down