Java tutorial
//package com.java2s; public class Main { public static String getDefaultTag(StackTraceElement stackTraceElement) { String fileName = stackTraceElement.getFileName(); String stringArray[] = fileName.split("\\."); String tag = stringArray[0]; return tag; } }