Examples of Logger


Examples of org.apache.felix.mosgi.jmx.agent.mx4j.log.Logger

      return true;
   }

   private boolean isMBeanTypeCompliant(MBeanMetaData metadata)
   {
      Logger logger = getLogger();

      if (metadata.standard && metadata.dynamic)
      {
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("MBean is both standard and dynamic");
         return false;
      }
      if (!metadata.standard && !metadata.dynamic)
      {
         if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("MBean is not standard nor dynamic");
         return false;
      }

      return true;
   }

Examples of org.apache.felix.resolver.Logger

public class Main
{
    public static void main(String[] args) throws ResolutionException
    {
        Resolver resolver = new ResolverImpl(new Logger(Logger.LOG_DEBUG));

        Map<Resource, Wiring> wirings = new HashMap<Resource, Wiring>();
        Map<Requirement, List<Capability>> candMap = new HashMap<Requirement, List<Capability>>();
        List<Resource> mandatory;
        ResolveContextImpl rci;

Examples of org.apache.felix.upnp.basedriver.tool.Logger

   * @since 0.3
   */
  private void doInitLogger() {
   
       String levelStr = configuration.getProperty(Constants.BASEDRIVER_LOG_PROP,"2");     
    Activator.logger = new Logger(levelStr);
   
      String cyberLog = configuration.getProperty(Constants.CYBERDOMO_LOG_PROP,"false");
      Activator.logger.setCyberDebug(cyberLog);     

  }

Examples of org.apache.felix.utils.log.Logger

     */
    public ObrURLStreamHandlerService(BundleContext context, org.apache.felix.bundlerepository.RepositoryAdmin admin)
    {
        m_bundleContext = context;
        m_reRepositoryAdmin = admin;
        m_logger = new Logger(context);
        if (m_bundleContext.getProperty(OBR_UPDATE_STRATEGY) != null)
        {
            this.m_updateStrategy = m_bundleContext.getProperty(OBR_UPDATE_STRATEGY);
        }
    }

Examples of org.apache.james.jspf.core.Logger

        if (log == null) {
                log = new ConsoleLogger();
        }

        Logger testLogger = log.getChildLogger("test");
        testLogger.info("TESTING "+next+": "+currentTest.get("description"));
   
        if (parser == null) {
            /* PREVIOUS SLOW WAY
            enabledServices = new WiringServiceTable();
            enabledServices.put(LogEnabled.class, log);
            */
            parser = new DefaultSPF1Parser(log.getChildLogger("parser"), new DefaultTermsFactory(log.getChildLogger("termsfactory"), new WiringService() {

                public void wire(Object component) throws WiringServiceException {
                    if (component instanceof LogEnabled) {
                        String[] path = component.getClass().toString().split("\\.");
                        ((LogEnabled) component).enableLogging(log.getChildLogger("dep").getChildLogger(path[path.length-1].toLowerCase()));
                    }
                    if (component instanceof DNSServiceEnabled) {
                        ((DNSServiceEnabled) component).enableDNSService(dns);
                    }
                    if (component instanceof SPFCheckEnabled) {
                        ((SPFCheckEnabled) component).enableSPFChecking(spf);
                    }
                }
               
            }));
        }
        dns = new LoggingDNSService(getDNSService(), log.getChildLogger("dns"));
        spf = new SPF(dns, parser, log.getChildLogger("spf"));
        /* PREVIOUS SLOW WAY
        // we add this after the creation because it is a loop reference
        enabledServices.remove(DNSServiceEnabled.class);
        enabledServices.put(DNSServiceEnabled.class, getDNSService());
        enabledServices.remove(SPFCheckEnabled.class);
        enabledServices.put(SPFCheckEnabled.class, spf);
        */

        String ip = null;
        String sender = null;
        String helo = null;
   
        if (currentTest.get("helo") != null) {
            helo = (String) currentTest.get("helo");
        }
        if (currentTest.get("host") != null) {
            ip = (String) currentTest.get("host");
        }
        if (currentTest.get("mailfrom") != null) {
            sender = (String) currentTest.get("mailfrom");
        } else {
            sender = "";
        }
   
        SPFResult res = spf.checkSPF(ip, sender, helo);
        String resultSPF = res.getResult();
       
        if (currentTest.get("result") instanceof String) {
            assertEquals("Test "+next+" ("+currentTest.get("description")+") failed. Returned: "+res.getResult()+" Expected: "+currentTest.get("result")+" [["+res.getResult()+"||"+res.getHeaderText()+"]]", currentTest.get("result"), res.getResult());
        } else {
            ArrayList results = (ArrayList) currentTest.get("result");
            boolean match = false;
            for (int i = 0; i < results.size(); i++) {
                if (results.get(i).equals(resultSPF)) match = true;
                // testLogger.debug("checking "+resultSPF+" against allowed result "+results.get(i));
            }
            assertTrue(match);
        }
       
        if (currentTest.get("explanation") != null) {
           
            // Check for our default explanation!
            if (currentTest.get("explanation").equals("DEFAULT") || currentTest.get("explanation").equals("postmaster") ) {
                assertTrue(res.getExplanation().startsWith("http://www.openspf.org/why.html?sender="));
            } else if (currentTest.get("explanation").equals("cafe:babe::1 is queried as 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.E.B.A.B.E.F.A.C.ip6.arpa")) {
                // See http://java.sun.com/j2se/1.4.2/docs/api/java/net/Inet6Address.html   
                // For methods that return a textual representation as output value, the full form is used.
                // Inet6Address will return the full form because it is unambiguous when used in combination with other textual data.
                assertTrue(res.getExplanation().equals("cafe:babe:0:0:0:0:0:1 is queried as 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.E.B.A.B.E.F.A.C.ip6.arpa"));
            } else {
                assertEquals(currentTest.get("explanation"),res.getExplanation());
            }
   
        }
   
        testLogger.info("PASSED. Result="+res.getResult()+" Explanation="+res.getExplanation()+" Header="+res.getHeaderText());
       
    }

Examples of org.apache.james.protocols.api.logger.Logger

      this.backend = backend;
  }

  public void start() throws Exception
  {
    Logger logger = new LMTPProtocolLogger();

    LMTPProtocolHandlerChain chain = new LMTPProtocolHandlerChain();
    chain.add(0, new ElasticInboxDeliveryHandler(backend));
    chain.add(0, new ValidRcptHandler());
    chain.wireExtensibleHandlers();

Examples of org.apache.jasper.logging.Logger

                jspUri = jspFile;
            }

            boolean precompile = preCompile(request);

      Logger jasperLog = Constants.jasperLog;
     
            if (jasperLog != null
        && jasperLog.matchVerbosityLevel(Logger.INFORMATION))
    {
        jasperLog.log("JspEngine --> "+jspUri);
        jasperLog.log("\t     ServletPath: " +
                                  request.getServletPath());
        jasperLog.log("\t        PathInfo: " +
                                  request.getPathInfo());
        jasperLog.log("\t        RealPath: " +
                                  context.getRealPath(jspUri));
        jasperLog.log("\t      RequestURI: " +
                                  request.getRequestURI());
        jasperLog.log("\t     QueryString: " +
                                  request.getQueryString());
        jasperLog.log("\t  Request Params: ");
        Enumeration e = request.getParameterNames();
        while (e.hasMoreElements()) {
      String name = (String) e.nextElement();
      jasperLog.log("\t\t " + name + " = " +
                                      request.getParameter(name));
        }
    }
            serviceJspFile(request, response, jspUri, null, precompile);
  } catch (RuntimeException e) {

Examples of org.apache.log.Logger

    private LogkitLogger createLogger( final MockLogTarget target,
                                       final Priority priority )
    {
        final Hierarchy hierarchy = new Hierarchy();
        final Logger logkitLogger = hierarchy.getLoggerFor( "test" );
        logkitLogger.setLogTargets( new LogTarget[]{target} );
        logkitLogger.setPriority( priority );
        final LogkitLogger logger = new LogkitLogger( logkitLogger );
        return logger;
    }

Examples of org.apache.log4j.Logger

    Logger log4j = getLogger(context);
    log4j.log(convert2Log4JLevel(level), msg);
  }

  public void log(int level, String context, Throwable t, Object msg) {
    Logger log4j = getLogger(context);
    log4j.log(convert2Log4JLevel(level), msg, t);
  }

Examples of org.apache.logging.log4j.Logger

    public void log4j2SocketAppenderTest() throws InterruptedException {
        final Util.StringContainer container = Util.readLineFromPort(Util.port, Util.timeoutInMs);

        String helloChina = "Hello, \u4E2D\u570B!";

        Logger logger = LogManager.getLogger("splunk.logger");
        logger.info(helloChina);

        synchronized (container) {
            container.wait(Util.timeoutInMs);
        }
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.