import net.pterodactylus.util.envopt.Option;
+import java.util.StringJoiner;
+
/**
* Options for Rhynodge which must be set as environment variables.
*
@Option(name = "CHAIN_DIRECTORY", defaultValue = "chains")
public final String chainDirectory = null;
+ @Override
+ public String toString() {
+ return new StringJoiner(", ", Options.class.getSimpleName() + "[", "]")
+ .add("smtpHostname='" + smtpHostname + "'")
+ .add("errorEmailSender='" + errorEmailSender + "'")
+ .add("errorEmailRecipient='" + errorEmailRecipient + "'")
+ .add("stateDirectory='" + stateDirectory + "'")
+ .add("chainDirectory='" + chainDirectory + "'")
+ .toString();
+ }
+
}
import java.io.IOException;
import java.util.Arrays;
+import java.util.logging.Logger;
import net.pterodactylus.rhynodge.actions.EmailAction;
import net.pterodactylus.rhynodge.loader.ChainWatcher;
*/
public static void main(String... arguments) throws IOException {
Options options = Parser.fromSystemEnvironment().parseEnvironment(Options::new);
+ logger.info("Options: " + options);
EmailAction errorEmailAction =
createErrorEmailAction(options.smtpHostname, options.errorEmailSender, options.errorEmailRecipient);
return new EmailAction(smtpHostname, errorEmailSender, errorEmailRecipient);
}
+ private static final Logger logger = Logger.getLogger(Starter.class.getName());
+
}