String (String loggerName) { StringBuilder result = new StringBuilder(); int pos = 0; if (loggerName.startsWith("#")) { result.append('#'); pos++; } if (!loggerName.startsWith("com.intellij", pos) && !loggerName.startsWith("com.jetbrains", pos) && !loggerName.startsWith("org.jetbrains", pos)) { return loggerName; } while (true) { int nextDot = loggerName.indexOf('.', pos); if (nextDot < 0) { result.append(loggerName.substring(pos)); return result.toString(); } result.append(loggerName.charAt(pos)).append('.'); pos = nextDot + 1; } }