public String toLogctlModSpec() {
        var spec = new StringBuilder();
        boolean comma = false;
        for (var entry : levelMods.entrySet()) {
            if (comma) {
                spec.append(",");
            }
            spec.append(entry.getKey());
            spec.append("=");
            spec.append(entry.getValue());
            comma = true;
        }
        return spec.toString();
    }
@Test
    public void hasCorrectDefault() {
        String wanted = "fatal=on,error=on,warning=on,info=on,event=on,config=on,debug=off,spam=off";
        var l = new LevelsModSpec();
        assertEquals(wanted, l.toLogctlModSpec());
    }