stanfordnlp/CoreNLP · error · IllegalArgumentException

Could not find Redwood log property:

Error message

Could not find Redwood log property: 

What it means

After parsing, parse() tracks which log.* properties were consumed in the 'used' set and throws this IllegalArgumentException for any remaining property starting with 'log.' — i.e. an unrecognized or misspelled Redwood logging property.

Solutions

  1. Fix or remove the offending log.* property; valid keys include log.method, log.handlers, log.channels.debug, log.collapse, log.filter, etc.
  2. Check the key spelling against RedwoodConfiguration documentation for your library version.
  3. Rename application-specific keys so they do not start with the reserved 'log.' prefix.
  4. If a property worked before, verify it still exists in the current library version (API changes between releases).

Example fix

// before
props.setProperty("log.colaps", "none"); // typo
// after
props.setProperty("log.collapse", "none");
Defensive patterns

Strategy: validation

Validate before calling

Set<String> known = Set.of("log.method", "log.handlers", "log.channels.debug", "log.collapse", "log.filter", "log.adapt.javautillogging");
for (String key : props.stringPropertyNames()) {
  if (key.startsWith("log.") && !known.contains(key)) {
    throw new IllegalArgumentException("Unknown Redwood log property: " + key);
  }
}

Try / catch

try {
  RedwoodConfiguration.applyProperties(props);
} catch (IllegalArgumentException e) {
  if (e.getMessage().startsWith("Could not find Redwood log property:")) {
    String bad = e.getMessage().substring(e.getMessage().lastIndexOf(' ') + 1);
    props.remove(bad); // or fix the key, then retry
    RedwoodConfiguration.applyProperties(props);
  } else throw e;
}

Prevention

When it happens

Trigger: Passing a Properties object with a key starting with log. that Redwood does not understand, e.g. log.loglevel, log.colour, log.colaps — any typo of a supported key.

Common situations: Typos in keys like log.neural vs log.neurl; inventing keys expecting they'd work; upgrading/downgrading CoreNLP where a log.* property name changed or was removed.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


AI-assisted analysis of stanfordnlp/CoreNLP@1b7edd19c4 (2026-09-10). Data as JSON: /api/errors/0a108f701bee0cf0. Report an issue: GitHub.

Appendix: source

Thrown at src/edu/stanford/nlp/util/logging/RedwoodConfiguration.java:625

    //--File
    String outputFile = get(props, "log.file", null, used);
    if (outputFile != null) {
      config.defaultFile = new File(outputFile);
      config = config.handlers(Handlers.defaultFile);
    }

    //--Console
    config = config.output(get(props, "log.output", "stdout", used));

    //--Console
    config = config.handlers(Handlers.chain(chain.toArray(new LogRecordHandler[chain.size()]), Handlers.output));

    //--Error Check
    for(Object propAsObj : props.keySet()) {
      String prop = propAsObj.toString();
      if(prop.startsWith("log.") && !used.contains(prop)){
        throw new IllegalArgumentException("Could not find Redwood log property: " + prop);
      }
    }
    //--Return
    return config;
  }

  /**
   * Parses a properties file and applies it immediately to Redwood
   * @param props The properties to apply
   */
  public static void apply(Properties props){
    parse(props).apply();
  }


  /*
  public static void main(String[] args) {
    RedwoodConfiguration.empty().neatExit().capture(System.out).capture(System.err)

View on GitHub (pinned to 1b7edd19c4)