Switch branches/tags
Find file
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (22 sloc) 869 Bytes
import grails.util.Metadata
includeTargets << grailsScript("Init")
includeTargets << new File("${cloudBeesPluginDir}/scripts/_CheckConfig.groovy")
includeTargets << new File("${cloudBeesPluginDir}/scripts/_BeesHelper.groovy")
includeTargets << new File("${cloudBeesPluginDir}/scripts/_BeesCommon.groovy")
USAGE = '''
grails bees-app-tail [appId] [LOGNAME]
appId : the application id (in the form user/appname)
LOGNAME : server, access or error (defaults to server)
target(beesAppTail: "Establishes a persistent connection to the application logs.") {
depends(checkConfig, prepareClient)
String log = getOptionalArg(1) ?: 'server'
String appId = buildAppId()
try {
event "StatusFinal", ["Tailing log $log on $appId"]
beesClient.tailLog(appId, log, System.out)
} catch (Exception e) {
dealWith e