Skip to content

Commit

Permalink
added debug logger
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoenisch committed Jan 13, 2017
1 parent 58de975 commit cc049fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015-2016 TraceTronic GmbH
* Copyright (c) 2015-2017 TraceTronic GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -106,6 +106,16 @@ public void logError(final String message) {
logAnnot("[TT] ERROR: ", message);
}

/**
* Log debug message.
*
* @param message
* the message to log
*/
public void logDebug(final String message) {
logAnnot("[TT] DEBUG: ", message);
}

/**
* Logs annotated message.
*
Expand Down
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2015-2016 TraceTronic GmbH
* Copyright (c) 2015-2017 TraceTronic GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
Expand Down Expand Up @@ -60,6 +60,9 @@ public ConsoleAnnotator<Object> annotate(final Object context, final MarkupText
text.addMarkup(0, text.length(), "<span style=\"color:#208CA3\">", "</span>");
addResultMarkup(text);
}
if (plainText.contains("DEBUG:")) {
text.addMarkup(0, text.length(), "<span style=\"color:#63666A\">", "</span>");
}
return null;
}

Expand Down

0 comments on commit cc049fa

Please sign in to comment.