docs: @SuppressWarnings({"rawtypes", "unchecked"})
      protected void toggleOwnFile(Logger logchannel) {
  
          String filepath = "";
  
          Layout layout = null;
          // if the button is activated check the value of the button
          // the button was active
          if (isloggingactivated(logchannel)) {
              // remove the private Appender from logger
              for (Appender appender : logchannel.getAppenders().values()) {
                  logchannel.removeAppender(appender);
              }
              // activate the heredity so the logger get the appender from parent logger
              logchannel.setAdditive(true);
  
          }
          // the button was inactive
          else {
              // get the layout and file path from root logger
              for (Appender appender : ((Logger)LogManager.getRootLogger()).getAppenders().values()) {
                  if (CmsLogFileApp.isFileAppender(appender)) {
                      String fileName = CmsLogFileApp.getFileName(appender);
                      filepath = fileName.substring(0, fileName.lastIndexOf(File.separatorChar));
                      layout = appender.getLayout();
                      break;
                  }
              }
  
              // check if the logger has an Appender get his layout
              for (Appender appender : logchannel.getAppenders().values()) {
                  if (CmsLogFileApp.isFileAppender(appender)) {
                      layout = appender.getLayout();
                      break;
                  }
              }
              String logfilename = "";
              String temp = logchannel.getName();
              // check if the logger name begins with "org.opencms"
              if (logchannel.getName().contains(OPENCMS_CLASS_PREFIX)) {
                  // remove the prefix "org.opencms" from logger name to generate the file name
                  temp = temp.replace(OPENCMS_CLASS_PREFIX, "");
                  // if the name has suffix
                  if (temp.length() >= 1) {
                      logfilename = filepath + File.separator + "opencms-" + temp.substring(1).replace(".", "-") + ".log";
                  }
                  // if the name has no suffix
                  else {
                      logfilename = filepath + File.separator + "opencms" + temp.replace(".", "-") + ".log";
                  }
              }
              // if the logger name not begins with "org.opencms"
              else {
                  logfilename = filepath + File.separator + "opencms-" + temp.replace(".", "-") + ".log";
              }
  
              FileAppender fapp = ((Builder)FileAppender.<FileAppender.Builder> newBuilder().withFileName(
                  logfilename).withLayout(layout).withName(logchannel.getName())).build();
  
              // deactivate the heredity so the logger get no longer the appender from parent logger
              logchannel.setAdditive(false);
              // remove all active Appenders from logger
              for (Appender appender : logchannel.getAppenders().values()) {
                  logchannel.removeAppender(appender);
              }
              // add the new created Appender to the logger
              logchannel.addAppender(fapp);
          }
          updateFile();
      }