Skip to content

Commit

Permalink
chore(context): add debug log on option update
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Mar 10, 2024
1 parent 7892a4f commit e0dde5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rime/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ void Context::set_input(const string& value) {

void Context::set_option(const string& name, bool value) {
options_[name] = value;
DLOG(INFO) << "Context::set_option " << name << " = " << value;
option_update_notifier_(this, name);
}

Expand All @@ -313,8 +314,10 @@ string Context::get_property(const string& name) const {
}

void Context::ClearTransientOptions() {
DLOG(INFO) << "Context::ClearTransientOptions";
auto opt = options_.lower_bound("_");
while (opt != options_.end() && !opt->first.empty() && opt->first[0] == '_') {
DLOG(INFO) << "cleared opption: " << opt->first;
options_.erase(opt++);
}
auto prop = properties_.lower_bound("_");
Expand Down

0 comments on commit e0dde5d

Please sign in to comment.