You are here: 1 – Setup > 1.4 Viewpoint customization > Customizing logging

Customizing logging

By default, Viewpoint sends log files to the $VIEWPOINT_HOME directory. However, you can modify where the logs are sent, and you can change the logging verbosity by following these instructions.

Viewpoint uses Grails logging. For information, see http://grails.org/doc/latest/guide/single.html#logging.

To customize logging in Viewpoint

  1. Copy and paste the following into the log4j.groovy file in the $VIEWPOINT_HOME directory:
  2. import com.cri.viewpoint.server.Viewpoint
    log4j = {
        appenders {
            rollingFile name:'vpLog', layout:pattern(conversionPattern: '%d{yyyy.MM.dd HH.mm.ss,SSS} %5p %c{1}:%L - %m%n'), maxBackupIndex:5, file: Viewpoint.getViewpointHome() + '/viewpoint.log'
    }
    
        // NOTE: These are default loggers that normally shouldn't be changed
        //
        error 'org.codehaus.groovy.grails.web.servlet', // controllers
              'org.codehaus.groovy.grails.web.pages', //  GSP
              'org.codehaus.groovy.grails.web.sitemesh', // layouts
              'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
              'org.codehaus.groovy.grails.web.mapping', // URL mapping
              'org.codehaus.groovy.grails.commons', // core / classloading
              'org.codehaus.groovy.grails.plugins', // plugins
              'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
              'org.springframework',
              'org.hibernate',
              'net.sf.ehcache.hibernate'
        warn  'org.mortbay.log'
    
        // Viewpoint logging
        //
        warn  'grails.app'
        info  'ApplicationPlugin'
    
        root {
            error 'vpLog'
        }
    }
  3. Customize the settings to meet your specifications. For information on how to customize, see http://grails.org/doc/latest/guide/single.html#logging.
  4. As part of your logging customization, you can specify the following Viewpoint packages:

    Value Description
    com.cri

    This is the general package for all Viewpoint server code. This will log all server interaction with the Viewpoint Web server.

    com.cri.security This is the logger for all security packages. This is important for authentication and authorization testing.
    com.ace This is the logger for external Java API classes. This includes Java code that has been validated for external customer consumption. Classes include MoabJob, MoabNode, Reservation, and so forth. See the Moab Java API for more information.
    com.Moab This is the logger for internal Java API classes. Classes include VPCs, low-level Moab consumption, etc. This is the logger that shows what Moab commands are sent and the associated output.
    org.codehaus.groovy.grails.web.servlet This is the logger for controllers.
    org.codehaus.groovy.grails.web.pages This is the logger for GSP.
    org.codehaus.groovy.grails.web.sitemesh This is the logger for layouts.
    org.codehaus.groovy.grails.web.mapping.filter This is the logger for URL mapping.
    org.codehaus.groovy.grails.web.mapping This is the logger for URL mapping.
    org.codehaus.groovy.grails.commons This is the logger for classloading.
    org.codehaus.groovy.grails.plugins This is the logger for plugins.
    org.codehaus.groovy.grails.orm.hibernate This is the logger for hibernate integration.
    org.springframework ---
    org.hibernate ---
    net.sf.ehcache.hibernate ---
  5. Save your changes to the log4j.groovy file.

Related topics 

© 2015 Adaptive Computing