code: private String[] buildsufix(String logname) {
  
          // help String array to store all combination
          String[] prefix_temp = new String[logname.length()];
          int count = 0;
          while (logname.indexOf(".") > 1) {
              // separate the name of the logger into pieces of name and separator e.g.: "org."
              String subprefix = logname.substring(0, logname.indexOf(".") + 1);
              logname = logname.replace(subprefix, "");
              if (logname.indexOf(".") > 1) {
                  if (count > 0) {
                      // build different suffixes based on the pieces separated above
                      prefix_temp[count] = prefix_temp[count - 1] + subprefix;
                  } else {
                      // if it's the first piece of the name only it will be set
                      prefix_temp[count] = subprefix;
  
                  }
              }
              count++;
          }
          // if the logger name has more then one piece
          if (count >= 1) {
              // create result string array
              String[] prefix = new String[count - 1];
              // copy all different prefixes to one array with right size
              for (int i = 0; i < (count - 1); i++) {
                  prefix[i] = prefix_temp[i].substring(0, prefix_temp[i].length() - 1);
              }
              // return all different prefixes
              return prefix;
          }
          // if the logger name has only one or less piece
          else {
              // return the full logger name
              String[] nullreturn = new String[1];
              nullreturn[0] = logname;
              return nullreturn;
          }
      }
docs: Simple function to get the prefix of an logchannel name.<p>
  
  @param logname the full name of the logging channel
  
  @return a string array with different package prefixes