2e3ebc43 by Ean Schuessler

Add debug logging to BrowseScreens service

1 parent 2f74974d
...@@ -1277,6 +1277,7 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) ...@@ -1277,6 +1277,7 @@ def wikiInstructions = getWikiInstructions(inputScreenPath)
1277 import org.moqui.context.ExecutionContext 1277 import org.moqui.context.ExecutionContext
1278 1278
1279 ExecutionContext ec = context.ec 1279 ExecutionContext ec = context.ec
1280 ec.logger.info("BrowseScreens: SERVICE STARTED")
1280 def subscreens = [] 1281 def subscreens = []
1281 def currentPath = path ?: "root" 1282 def currentPath = path ?: "root"
1282 def userGroups = ec.user.getUserGroupIdSet().collect { it } 1283 def userGroups = ec.user.getUserGroupIdSet().collect { it }
...@@ -1367,7 +1368,8 @@ def wikiInstructions = getWikiInstructions(inputScreenPath) ...@@ -1367,7 +1368,8 @@ def wikiInstructions = getWikiInstructions(inputScreenPath)
1367 // Helper to extract short description from wiki content 1368 // Helper to extract short description from wiki content
1368 def getShortDescription = { wikiText -> 1369 def getShortDescription = { wikiText ->
1369 if (!wikiText) return null 1370 if (!wikiText) return null
1370 def lines = wikiText.split('\n') 1371 def textString = wikiText instanceof String ? wikiText : new String(wikiText, "UTF-8")
1372 def lines = textString.split('\n')
1371 for (def line : lines) { 1373 for (def line : lines) {
1372 if (line.trim() && !line.trim().startsWith('#')) { 1374 if (line.trim() && !line.trim().startsWith('#')) {
1373 return line.trim().take(200) 1375 return line.trim().take(200)
......