/** * Constructor. * * @param loggerName * The name of the logger to use. */ public Context(String loggerName) { this(Engine.getLogger(loggerName)); }
/** * Sets the logger. * * @param loggerName * The name of the logger to use. */ public void setLogger(String loggerName) { setLogger(Engine.getLogger(loggerName)); }
/** * Constructor. * * @param context * The context. * @param logService * The log service descriptor. */ public LogFilter(Context context, LogService logService) { super(context); this.logService = logService; if (logService != null) { if (logService.getLoggerName() != null) { this.logLogger = Engine.getLogger(logService.getLoggerName()); } else if ((context != null) && (context.getLogger().getParent() != null)) { this.logLogger = Engine.getLogger(context.getLogger() .getParent().getName() + "." + LogUtils.getBestClassName(logService.getClass())); } else { this.logLogger = Engine.getLogger(LogUtils .getBestClassName(logService.getClass())); } } }
/** * Returns the current context's logger. * * @return The current context's logger. */ public static Logger getCurrentLogger() { return (Context.getCurrent() != null) ? Context.getCurrent() .getLogger() : Engine.getLogger("org.restlet"); }
/** * Returns the context's logger. * * @return The context's logger. */ public Logger getLogger() { Logger result = null; Context context = getContext(); if (context == null) { context = Context.getCurrent(); } if (context != null) { result = context.getLogger(); } if (result == null) { result = Engine.getLogger(this, "org.restlet"); } return result; }
Engine.getLogger("").getHandlers()[0] .setFilter(record -> record.getLoggerName().startsWith("org.restlet.ext.platform"));
Engine.getLogger("").getHandlers()[0] .setFilter(record -> record.getLoggerName().startsWith("org.restlet.ext.platform"));
Engine.getLogger("").getHandlers()[0] .setFilter(record -> record.getLoggerName().startsWith("org.restlet.ext.platform"));
Engine.getLogger("").getHandlers()[0] .setFilter(record -> record.getLoggerName().startsWith("org.restlet.ext.platform"));
Engine.getLogger("").getHandlers()[0] .setFilter(new java.util.logging.Filter() { public boolean isLoggable(LogRecord record) {
Engine.getLogger(LogService.class).log(Level.SEVERE, "Cannot retrieve size of request's entity", t); sb.append("-");