Guidewire Best Practices Exam study
guide questions with Complete
Solutions
Logging is - Ans The process of recording application actions and state to a secondary interface
Logging is used for - Ans Application maintenance and troubleshooting
Creating statistics relating to application usage
Auditing by capturing significant events
Typical events to log are - Ans Success / Failure - a transaction or action has succeeded or failed
Recovery - a system went down or connection failed, retried, and recovered
Identification - any large functional areas such as integration, rating, reinsurance, and rules
Logging components - Logger - Ans has a category and level, sends content to an Appender
Logging components - Appender - Ans is an output destination (server console or rolling file)
Logging components - Layout - Ans defines the format of the content sent to an appender
Logging Level - Trace - Ans Description: Fine-grained informational events
When to use: Log method entry and exit
,Logging Level - Debug - Ans Description: Detailed informational events
When to use: Log important steps and calculations for diagnosing problems
Logging Level - Info - Ans Description: Coarse-grained informational messages of progress
When to use: Log the occurrence or result of an important event
Logging Level - Warn - Ans Description: Indicate a potential problem
When to use: The user experience has not been affected
Logging Level - Error - Ans Description - Indicate definite problems
When to use: The user experience has been affected
There are 2 ways to initialize a logger in Gosu - Ans Integration:
PLLoggerCategory.INTEGRATION
Plugin: PLLoggerCategory.PLUGIN
Use sub-level of existing logging category to maintain structure.
Example: PLUGIN.MotorVehicleRecord
static var _motorVehiclePluginLogger =
LoggerFactory.getLogger(PLLoggerCategory.PLUGIN."MotorVehicleRecord")
Logging Format should be - Ans a standard format to simplify analysis of large logs
Guarded Logging should be used - Ans To test log level before logging costly messages (those
with expensive expressions)
, Typically used with the DEBUG level
Format is - if (_logger.DebugEnabled) { <log statement content>}
Not required for parameterized expressions lacking expensive operations, as in:
var hello = "Hello"
var world = "world"
_logger.debug("{}, {}!", hello, world)
Logging: Exception Messages - Ans Logged at the ERROR level when user interface is affected
Not all exceptions are errors - if they are expected, log at WARN or INFO level
Pass the exception object as the second argument
Logging Guidelines - Ans Log with enough information to explain the state of the
application and what was happening
Excessive logging results in large logs with potential performance risk
Insufficient logging results in logs that lack utility
Use care with:
Data that is protected by legal, regulatory, or contractual obligations
Personally Identifiable Information (PII) - do not log PII at all!
Guidewire Query API General Best Practices - Ans Use the property reference
(EntityType#Property) for type-safe access to the properties on the query entity type
Use the property reference to filter query results, join to another entity type, order rows in
the result set, or to specify a column for a row query
Use query.contains() after other query.compare() operations against indexed columns
for better performance against large data sets
guide questions with Complete
Solutions
Logging is - Ans The process of recording application actions and state to a secondary interface
Logging is used for - Ans Application maintenance and troubleshooting
Creating statistics relating to application usage
Auditing by capturing significant events
Typical events to log are - Ans Success / Failure - a transaction or action has succeeded or failed
Recovery - a system went down or connection failed, retried, and recovered
Identification - any large functional areas such as integration, rating, reinsurance, and rules
Logging components - Logger - Ans has a category and level, sends content to an Appender
Logging components - Appender - Ans is an output destination (server console or rolling file)
Logging components - Layout - Ans defines the format of the content sent to an appender
Logging Level - Trace - Ans Description: Fine-grained informational events
When to use: Log method entry and exit
,Logging Level - Debug - Ans Description: Detailed informational events
When to use: Log important steps and calculations for diagnosing problems
Logging Level - Info - Ans Description: Coarse-grained informational messages of progress
When to use: Log the occurrence or result of an important event
Logging Level - Warn - Ans Description: Indicate a potential problem
When to use: The user experience has not been affected
Logging Level - Error - Ans Description - Indicate definite problems
When to use: The user experience has been affected
There are 2 ways to initialize a logger in Gosu - Ans Integration:
PLLoggerCategory.INTEGRATION
Plugin: PLLoggerCategory.PLUGIN
Use sub-level of existing logging category to maintain structure.
Example: PLUGIN.MotorVehicleRecord
static var _motorVehiclePluginLogger =
LoggerFactory.getLogger(PLLoggerCategory.PLUGIN."MotorVehicleRecord")
Logging Format should be - Ans a standard format to simplify analysis of large logs
Guarded Logging should be used - Ans To test log level before logging costly messages (those
with expensive expressions)
, Typically used with the DEBUG level
Format is - if (_logger.DebugEnabled) { <log statement content>}
Not required for parameterized expressions lacking expensive operations, as in:
var hello = "Hello"
var world = "world"
_logger.debug("{}, {}!", hello, world)
Logging: Exception Messages - Ans Logged at the ERROR level when user interface is affected
Not all exceptions are errors - if they are expected, log at WARN or INFO level
Pass the exception object as the second argument
Logging Guidelines - Ans Log with enough information to explain the state of the
application and what was happening
Excessive logging results in large logs with potential performance risk
Insufficient logging results in logs that lack utility
Use care with:
Data that is protected by legal, regulatory, or contractual obligations
Personally Identifiable Information (PII) - do not log PII at all!
Guidewire Query API General Best Practices - Ans Use the property reference
(EntityType#Property) for type-safe access to the properties on the query entity type
Use the property reference to filter query results, join to another entity type, order rows in
the result set, or to specify a column for a row query
Use query.contains() after other query.compare() operations against indexed columns
for better performance against large data sets