protected Bark(Context context) {
        super(context); // will register this object in context with Log.logKey
        context.put(barkKey, this);

        // register additional resource bundle for APT messages.
        Messages aptMessages = new Messages(Messages.getDefaultBundle());
        aptMessages.add("com.sun.tools.apt.resources.apt");
        aptDiags = new JCDiagnostic.Factory(aptMessages, "apt");

        multipleErrors = true;
    }