Changeset 2:35de70964c96 in rrlib_logging-java


Ignore:
Timestamp:
14.12.2013 22:06:46 (9 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Bugfixes

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Log.java

    r1 r2  
    4343    public static void log(LogLevel level, Object origin, Object msg) { 
    4444        StackTraceElement callFrame = new Throwable().getStackTrace()[1]; 
    45         LogDomain domain = LogDomainRegistry.getDomainByQualifiedName(callFrame.getClassName().substring(0, callFrame.getClassName().lastIndexOf('/'))); 
     45        LogDomain domain = LogDomainRegistry.getDomainByQualifiedName(callFrame.getClassName().substring(0, callFrame.getClassName().lastIndexOf('.'))); 
    4646        domain.log(level, callFrame, origin, msg, 2); 
    4747    } 
     
    5959    public static void log(LogLevel level, Object msg) { 
    6060        StackTraceElement callFrame = new Throwable().getStackTrace()[1]; 
    61         LogDomain domain = LogDomainRegistry.getDomainByQualifiedName(callFrame.getClassName().substring(0, callFrame.getClassName().lastIndexOf('/'))); 
    62         domain.log(level, callFrame, callFrame.getClassName().substring(callFrame.getClassName().lastIndexOf('/') + 1), msg, 2); 
     61        LogDomain domain = LogDomainRegistry.getDomainByQualifiedName(callFrame.getClassName().substring(0, callFrame.getClassName().lastIndexOf('.'))); 
     62        domain.log(level, callFrame, callFrame.getClassName().substring(callFrame.getClassName().lastIndexOf('.') + 1), msg, 2); 
    6363    } 
    6464 
     
    9696    public static LogStream getLogStream(LogLevel level, Object origin) { 
    9797        StackTraceElement callFrame = new Throwable().getStackTrace()[1]; 
    98         LogDomain domain = LogDomainRegistry.getDomainByQualifiedName(callFrame.getClassName().substring(0, callFrame.getClassName().lastIndexOf('/'))); 
     98        LogDomain domain = LogDomainRegistry.getDomainByQualifiedName(callFrame.getClassName().substring(0, callFrame.getClassName().lastIndexOf('.'))); 
    9999        return domain.getLogStream(level, origin); 
    100100    } 
  • LogDomainRegistry.java

    r0 r2  
    564564        if (result == null) { 
    565565            synchronized (LogDomain.class) { 
    566                 String[] names = name.split("."); 
     566                String[] names = name.split("[.]"); 
    567567                int index = (names[0].length() == 0) ? 1 : 0; 
    568568                LogDomain current = getDefaultDomain(); 
Note: See TracChangeset for help on using the changeset viewer.