29.07.2013 Views

Master of Science thesis Fighting Spam

Master of Science thesis Fighting Spam

Master of Science thesis Fighting Spam

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

File files[] = f.listFiles();<br />

for(int i=0;i globalDebugLevel || level > getLevel(className))<br />

return "";<br />

if(print)<br />

print(out);<br />

return out;<br />

public static void debug(Class theclass, int level, String message,<br />

Throwable e)<br />

{<br />

if(globalDebugLevel == 0)<br />

return;<br />

boolean temp = print;<br />

print = false;<br />

String out = debug(theclass, level, message);<br />

print = temp;<br />

if(level == 1 && printLevel1 || level == 2 && printLevel2 ||<br />

level == 3 && printLevel3)<br />

{<br />

if(printExceptions)<br />

{<br />

out += e.getClass() + ": "+e.getLocalizedMessage()+"\n";<br />

}<br />

if(printExceptionStacktrace)<br />

{<br />

StackTraceElement[] se = e.getStackTrace();<br />

for(int i=0;i < se.length;i++)<br />

{<br />

out += "\tat " +se[i] + "\n";<br />

401

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!