Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package de.agilecoders.wicket.logging;
 
The resource reference that represents the entry point on server side for client side logging.

Returns:
current active settings
    private static IClientSideLoggingSettings settings() {
        return ClientSideLogging.settings();
    }

    
Construct.
        this(settings().id());
    }

    
Construct.

Parameters:
id the id of this resource reference
    public ClientSideErrorLoggingResourceReference(final String id) {
        super(new Key(ClientSideLoggingBehavior.class.getName(), idnullnullnull));
    }
    @Override
    public IResource getResource() {
        return new ClientSideErrorLoggingResource();
    }

    
The resource that is executed when an incoming log request needs to be handled.
    public static class ClientSideErrorLoggingResource extends AbstractResource {
        @Override
        protected ResourceResponse newResourceResponse(Attributes attributes) {
            writeToLog(attributes);
            return new EmptyResourceResponse();
        }

        
writes all log messages to the log store

Parameters:
attributes response attributes
        protected void writeToLog(Attributes attributes) {
            final IRequestParameters params = attributes.getRequest().getPostParameters();
            final IParamValueExtractor.Result result = settings().paramValueExtractor().parse(params);
            settings().logger().log(result.logObjects(), result.clientInfos());
        }
    }
New to GrepCode? Check out our FAQ X