Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Expanded logging example a little

...

Code Block
public class MyPage
{
    @Inject
    private Logger logger;

  
  . . .
  
    void onSuccessFromForm()
    {
        logger.info("Changes saved successfully");
    }

@Log annotation

You may mark any component method with the @Log annotation. Method entry, exit (and any thrown exceptions) will be logged at DEBUG level, along with parameter values and the method's return value. This is very convenient for debugging, especially when placed on event handler methods.

...

Tapestry performs a transformation on your classes as they are loaded, often and sometimes you want to gain insight into what it has done. Tapestry uses a secondary logger, consisting of the class name with the prefix "tapestry.transformer.", to log (at debug level) the results of transforming the class.

...