private Logger getJettyLogger(String loggerName) { return org.eclipse.jetty.util.log.Log.getLogger(loggerName); }
/** * Obtain a named Logger based on the fully qualified class name. * * @param clazz * the class to base the Logger name off of * @return the Logger with the given name */ public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); }
/** * Obtain a StdErrLog reference for the specified class, a convenience method used most often during testing to allow for control over a specific logger. * <p> * Must be actively using StdErrLog as the Logger implementation. * * @param clazz * the Class reference for the logger to use. * @return the StdErrLog logger * @throws RuntimeException * if StdErrLog is not the active Logger implementation. */ public static StdErrLog getLogger(Class<?> clazz) { Logger log = Log.getLogger(clazz); if (log instanceof StdErrLog) { return (StdErrLog)log; } throw new RuntimeException("Logger for " + clazz + " is not of type StdErrLog"); }
@Override public void failed(Throwable x) { Log.getLogger(this.getClass()).warn(x); } }
protected void doStop() throws Exception { super.doStop(); try {if (_writer != null) _writer.flush();} catch (IOException e) {Log.getLogger((String)null).ignore(e);} if (_out != null && _closeOut) try {_out.close();} catch (IOException e) {Log.getLogger((String)null).ignore(e);} _out = null; _fileOut = null; _closeOut = false; _logDateCache = null; _writer = null; _buffers = null; _copy = null; }
private static final Logger LOG = Log.getLogger(Resource.class); public static boolean __defaultUseCaches = true; volatile Object _associate;
setLog(getLogger(name));
public StacklessLogging(Class<?>... classesToSquelch) { for (Class<?> clazz : classesToSquelch) { Logger log = Log.getLogger(clazz); // only operate on loggers that are of type StdErrLog if (log instanceof StdErrLog && !log.isDebugEnabled()) { StdErrLog stdErrLog=((StdErrLog)log); if (!stdErrLog.isHideStacks()) { stdErrLog.setHideStacks(true); squelched.add(stdErrLog); } } } }
Log.getLogger((String)null).info("Opened "+getDatedFilename());
Log.getLogger((String)null).warn(e);
/** * Create and return a logger based on the ServletConfig for use in the * proxy servlet * * @param config * @return Logger */ protected Logger createLogger(ServletConfig config) { return Log.getLogger("org.eclipse.jetty.servlets." + config.getServletName()); }
/** * Obtain a named Logger based on the fully qualified class name. * * @param clazz * the class to base the Logger name off of * @return the Logger with the given name */ public static Logger getLogger(Class<?> clazz) { return getLogger(clazz.getName()); }
public void setDebugEnabled(String logger, Boolean enabled) { Log.getLogger(logger).setDebugEnabled(enabled); } }
@Produces public Logger createLogger(InjectionPoint injectionPoint) { return Log.getLogger(injectionPoint.getMember().getDeclaringClass()); } }
@Override public void failed(Throwable x) { Log.getLogger(this.getClass()).warn(x); } }
@Override public void failed(Throwable x) { Log.getLogger(this.getClass()).warn(x); } }
@ManagedOperation(value="true if debug enabled for the given logger") public boolean isDebugEnabled(@Name("logger") String logger) { return Log.getLogger(logger).isDebugEnabled(); }
private void configureJMX(final MBeanServer mbeanServer) { final MBeanContainer mbContainer = new MBeanContainer(mbeanServer); mbContainer.addBean(Log.getLogger(HttpServer.class)); server.addBean(mbContainer); }
@ManagedOperation(value="Set debug enabled for given logger") public void setDebugEnabled(@Name("logger")String logger, @Name("enabled") Boolean enabled) { Log.getLogger(logger).setDebugEnabled(enabled); } }
@ManagedOperation(value="Set debug enabled for given logger") public void setDebugEnabled(@Name("logger")String logger, @Name("enabled") Boolean enabled) { Log.getLogger(logger).setDebugEnabled(enabled); } }