Skip to content

Commit

Permalink
[JENKINS-21119] Extend loggning to show assigned priority
Browse files Browse the repository at this point in the history
 * Added missing log when global default priority is used
 * Make sure to log with finer() id log-level is ALL
  • Loading branch information
emsa23 committed Jan 2, 2014
1 parent 8d41a04 commit 035da32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -37,7 +37,8 @@ public class ItemTransitionLogger {
private final static Logger LOGGER = Logger.getLogger("PrioritySorter.Queue.Items");

static public void logNewItem(ItemInfo info) {
if (LOGGER.getLevel().intValue() >= Level.FINER.intValue()) {
if (LOGGER.getLevel().intValue() == Level.ALL.intValue()
|| LOGGER.getLevel().intValue() >= Level.FINER.intValue()) {
LOGGER.finer("New Item: " + info.toString() + "\n" + info.getDescisionLog());
} else {
LOGGER.fine("New Item: " + info.toString());
Expand Down
Expand Up @@ -229,6 +229,7 @@ public PriorityConfigurationCallback getPriority(Queue.Item item, PriorityConfig
return getPriorityForJobGroup(priorityCallback, jobGroup, item);
}
//
priorityCallback.addDecisionLog("Assigning global default priority");
return priorityCallback.setPrioritySelection(PrioritySorterConfiguration.get().getStrategy()
.getDefaultPriority());
}
Expand Down

0 comments on commit 035da32

Please sign in to comment.