loggingconfluenceconfluence-rest-apiscriptrunner-for-jira

How to access the whole log for code written on scriptrunner for confluence


I am writing code on scriptrunner for confluence to retrieve some information about the pages in one space. I am logging some information but the log exceeds 300enter image description here

How can I access the full log showing all of the information being a confluence admin?

Here is the code that I am using below:

import com.atlassian.confluence.links.OutgoingLink
import com.atlassian.confluence.pages.Page
import com.atlassian.confluence.pages.PageManager
import com.atlassian.confluence.spaces.Space
import com.atlassian.confluence.spaces.SpaceManager
import com.atlassian.sal.api.component.ComponentLocator
import org.apache.log4j.Logger
import com.atlassian.confluence.user.UserAccessor
import com.atlassian.sal.api.user.UserKey

SpaceManager spaceManager = ComponentLocator.getComponent(SpaceManager)
PageManager pageManager = ComponentLocator.getComponent(PageManager)
UserAccessor userAccessor = ComponentLocator.getComponent(UserAccessor)

Space space = spaceManager.getSpace("IWIKI")


for (Page page : pageManager.getPages(space, true)) {
    if(page.getCreator()==null){
            log.warn(page.toString()+",null")
    }
    else{
            String userID=page.getCreator().getName()
            String fullName =userAccessor.getUserByKey(page.getCreator().getKey()).getFullName()
            log.warn(page.toString()+","+userID+","+fullName+","+page.getLastModificationDate())

    }

   
}

Solution

  • Go to Build in Scripts and choose log. You will be able to see the whole log of print statements that were printed using

    log.warn(...)