| 88 | } |
| 89 | |
| 90 | void |
| 91 | ConfigElements::addCapture(const char *arg) |
| 92 | { |
| 93 | StringView args(arg); |
| 94 | StringView::size_type pos = args.find_first_of(':'); |
| 95 | if (StringView::npos != pos) { |
| 96 | String name(args.substr(0, pos)); |
| 97 | if (!name.empty()) { |
| 98 | String pattern(args.substr(pos + 1)); |
| 99 | if (!pattern.empty()) { |
| 100 | if (!setCapture(name, pattern)) { |
| 101 | CacheKeyError("failed to add capture: '%s'", arg); |
| 102 | } |
| 103 | } else { |
| 104 | CacheKeyError("missing pattern in capture: '%s'", arg); |
| 105 | } |
| 106 | } else { |
| 107 | CacheKeyError("missing element name in capture: %s", arg); |
| 108 | } |
| 109 | } else { |
| 110 | CacheKeyError("invalid capture: %s, should be 'name:<capture_definition>", arg); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | void |
| 115 | ConfigElements::setExcludePatterns(const char *arg) |