Permalink
Browse files

Actually create a logger

  • Loading branch information...
1 parent 6650f97 commit 7b6c27291e3aa6c11e69a36615f68f4484f75dc4 @omega committed Apr 2, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 rm-echo.groovy
View
@@ -1,8 +1,11 @@
+import org.apache.log4j.Category
+
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.fields.CustomField
+log = Category.getInstance("no.startsiden.no.jira.groovy.rmecho")
def team_field = "customfield_10520" // XXX: This is not pretty to hardcode?
def team_rooms = ["Startsiden":"#drift"] // XXX: this is not pretty to hardcode either
@@ -15,7 +18,7 @@ CustomFieldManager customFieldManager = componentManager.getCustomFieldManager()
CustomField customFieldSrc = customFieldManager.getCustomFieldObject(team_field)
team = issue.getCustomFieldValue(customFieldSrc)
-log.info team
+log.error team
room = team_rooms[team]
log.info room

0 comments on commit 7b6c272

Please sign in to comment.