Skip to content

Commit

Permalink
Added support for logging and Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Luc Paour committed Sep 1, 2002
1 parent bf06673 commit 905e0f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions com/gallery/GalleryRemote/Log.java
Expand Up @@ -128,6 +128,18 @@ public static void logStack(int level, String module)
}
}

public static void logException(int level, String module, Throwable t)
{
if ( level <= maxLevel ) {
log(level, module, t.toString());

CharArrayWriter caw = new CharArrayWriter();
t.printStackTrace(new PrintWriter(caw));

log(level, module, caw.toString());
}
}

public static String getShortClassName(Class c)
{
String name = c.getName();
Expand Down

0 comments on commit 905e0f5

Please sign in to comment.