Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package de.agilecoders.wicket.logging;
  
A set of configuration options for the clientside logging library

Author(s):
miha
 
 public class ClientSideLoggingSettings {
    
 
     };

    
installs default settings on given application

Parameters:
application the application to add the settings to
 
     public static void install(final WebApplication application) {
         install(applicationnew ClientSideLoggingSettings());
     }

    
installs given settings on given application

Parameters:
application the application to add the settings to
settings the settings to add
 
     public static void install(final WebApplication applicationfinal ClientSideLoggingSettings settings) {
         Args.notNull(application"application").setMetaData(,
                                                              Args.notNull(settings"settings"));
 
         WicketWebjars.install(application);
     }

    
returns the ClientSideLoggingSettings which are assigned to given application

Parameters:
app The current application
Returns:
assigned ClientSideLoggingSettings
 
     public static ClientSideLoggingSettings get(final Application app) {
     }

    
returns the ClientSideLoggingSettings which are assigned to current application

Returns:
assigned ClientSideLoggingSettings
 
     public static ClientSideLoggingSettings get() {
         if (Application.exists()) {
             return get(Application.get());
         }
 
         throw new IllegalStateException("there is no active application assigned to this thread.");
     }
 
     private String id = "client-side-logging";
     private String level = "error";
     private boolean debug = false;
     private boolean logStacktrace = false;
     private ILogCleaner cleaner = new ILogCleaner.DefaultLogCleaner();
     private ResourceReference reference = ClientSideLoggingJavaScript.instance();
sets the client side error level

Parameters:
level the error level to use on client side
Returns:
this instance for chaining
 
     public ClientSideLoggingSettings level(final String level) {
         this. = level;
         return this;
     }

    
sets the log message cleaner

Parameters:
cleaner the log message cleaner
Returns:
this instance for chaining
 
     public ClientSideLoggingSettings cleaner(final ILogCleaner cleaner) {
         this. = Args.notNull(cleaner"cleaner");
         return this;
     }

    
sets the logger implementation to use

Parameters:
logger the logger implementation to use
Returns:
this instance for chaining
    public ClientSideLoggingSettings logger(final IClientLogger logger) {
        this. = Args.notNull(logger"logger");
        return this;
    }

    
sets the request parameter parser

Parameters:
paramValueExtractor the request parameter parser
Returns:
this instance for chaining
    public ClientSideLoggingSettings paramValueExtractor(final IParamValueExtractor paramValueExtractor) {
        this. = Args.notNull(paramValueExtractor"paramValueExtractor");
        return this;
    }

    
sets the javascript reference to use to render clientside logging js

Parameters:
reference the js reference
Returns:
this instance for chaining
    public ClientSideLoggingSettings reference(final ResourceReference reference) {
        this. = Args.notNull(reference"reference");
        return this;
    }

    
sets the debug mode on client side

Parameters:
debug whether to activate debugging or not
Returns:
this instance for chaining
    public ClientSideLoggingSettings debug(final boolean debug) {
        this. = debug;
        return this;
    }

    
whether to log stacktrace or not

Parameters:
value whether to log stacktrace
Returns:
this instance for chaining
Since:
0.1.3
    public ClientSideLoggingSettings logStacktrace(final boolean value) {
        this. = value;
        return this;
    }

    

Returns:
client side log level
    public String level() { return ; }

    

Returns:
log message cleaner
    public ILogCleaner cleaner() { return ; }

    

Returns:
server side logger
    public IClientLogger logger() { return ; }

    

Returns:
use debug mode on client side
    public boolean debug() { return ; }

    

Returns:
TRUE, if stacktrace should be logged
Since:
0.1.3
    public boolean logStacktrace() { return ; }

    

Returns:
request parameter parser
    public IParamValueExtractor paramValueExtractor() { return ; }

    

Returns:
the library id (is used as logger name)
    public String id() { return ; }

    

Returns:
the javascript resource reference as header item.
    public JavaScriptHeaderItem javaScriptHeaderItem() { return JavaScriptHeaderItem.forReference(); }
New to GrepCode? Check out our FAQ X