class InstrumentedAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {

  public static final String COUNTER_NAME = "languagetool_logback_appender_total";
  
  private static final Counter COUNTER;

  static {
    COUNTER = Counter.build().name(COUNTER_NAME)
      .help("Logback log statements at various log levels")
      .labelNames("level", "logger", "marker", "exception")
      .register();
  }

  /**
   * Create a new instrumented appender using the default registry.
   */
  public InstrumentedAppender() {
  }


  @Override
  public void start() {
    super.start();
  }

  @Override
  protected void append(ILoggingEvent event) {<FILL_FUNCTION_BODY>}
}

    String marker = "";
    if (event.getMarker() != null) {
      marker = event.getMarker().getName();
    }
    String exception = "";
    if (event.getThrowableProxy() != null) {
      exception = event.getThrowableProxy().getClassName();
    }
    COUNTER.labels(event.getLevel().toString(), event.getLoggerName(), marker, exception).inc();
  
<no_super_class>