Examples of Log


Examples of org.apache.geronimo.javaee6.asynejb.entity.Log

    public void WriteIntoDB() {
        int count = 10;
        int current = 0;
        while (current < count) {
            try {
                Log log = new Log();
                Date dt = new Date();
                DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
                String nowTime = df.format(dt);
                log.setCreateTime(nowTime);
                log.setEvent("event" + new Random().nextInt());
//                System.out.println("count is :"+current);
                create(log);
               Thread.sleep(2000);
                current++;
          }
View Full Code Here

Examples of org.apache.isis.viewer.scimpi.dispatcher.view.debug.Log

        addElementProcessor(new Import());
        addElementProcessor(new IncludeObject());
        addElementProcessor(new IncludeField());
        addElementProcessor(new InitializeFromCookie());
        addElementProcessor(new InitializeFromResult());
        addElementProcessor(new Log());
        addElementProcessor(new LogLevel());
        addElementProcessor(new Logon());
        addElementProcessor(new Logoff());
        addElementProcessor(new LongFormView());
        addElementProcessor(new LinkField());
View Full Code Here

Examples of org.apache.juli.logging.Log

     * @exception ServletException if a servlet error occurs
     */
    public void invoke(Request request, Response response)
        throws IOException, ServletException {

        Log log = container.getLogger();
       
        // Log pre-service information
        log.info("REQUEST URI       =" + request.getRequestURI());
        log.info("          authType=" + request.getAuthType());
        log.info(" characterEncoding=" + request.getCharacterEncoding());
        log.info("     contentLength=" + request.getContentLength());
        log.info("       contentType=" + request.getContentType());
        log.info("       contextPath=" + request.getContextPath());
        Cookie cookies[] = request.getCookies();
        if (cookies != null) {
            for (int i = 0; i < cookies.length; i++)
                log.info("            cookie=" + cookies[i].getName() + "=" +
                    cookies[i].getValue());
        }
        Enumeration hnames = request.getHeaderNames();
        while (hnames.hasMoreElements()) {
            String hname = (String) hnames.nextElement();
            Enumeration hvalues = request.getHeaders(hname);
            while (hvalues.hasMoreElements()) {
                String hvalue = (String) hvalues.nextElement();
                log.info("            header=" + hname + "=" + hvalue);
            }
        }
        log.info("            locale=" + request.getLocale());
        log.info("            method=" + request.getMethod());
        Enumeration pnames = request.getParameterNames();
        while (pnames.hasMoreElements()) {
            String pname = (String) pnames.nextElement();
            String pvalues[] = request.getParameterValues(pname);
            StringBuffer result = new StringBuffer(pname);
            result.append('=');
            for (int i = 0; i < pvalues.length; i++) {
                if (i > 0)
                    result.append(", ");
                result.append(pvalues[i]);
            }
            log.info("         parameter=" + result.toString());
        }
        log.info("          pathInfo=" + request.getPathInfo());
        log.info("          protocol=" + request.getProtocol());
        log.info("       queryString=" + request.getQueryString());
        log.info("        remoteAddr=" + request.getRemoteAddr());
        log.info("        remoteHost=" + request.getRemoteHost());
        log.info("        remoteUser=" + request.getRemoteUser());
        log.info("requestedSessionId=" + request.getRequestedSessionId());
        log.info("            scheme=" + request.getScheme());
        log.info("        serverName=" + request.getServerName());
        log.info("        serverPort=" + request.getServerPort());
        log.info("       servletPath=" + request.getServletPath());
        log.info("          isSecure=" + request.isSecure());
        log.info("---------------------------------------------------------------");

        // Perform the request
        getNext().invoke(request, response);

        // Log post-service information
        log.info("---------------------------------------------------------------");
        log.info("          authType=" + request.getAuthType());
        log.info("     contentLength=" + response.getContentLength());
        log.info("       contentType=" + response.getContentType());
        Cookie rcookies[] = response.getCookies();
        for (int i = 0; i < rcookies.length; i++) {
            log.info("            cookie=" + rcookies[i].getName() + "=" +
                rcookies[i].getValue() + "; domain=" +
                rcookies[i].getDomain() + "; path=" + rcookies[i].getPath());
        }
        String rhnames[] = response.getHeaderNames();
        for (int i = 0; i < rhnames.length; i++) {
            String rhvalues[] = response.getHeaderValues(rhnames[i]);
            for (int j = 0; j < rhvalues.length; j++)
                log.info("            header=" + rhnames[i] + "=" + rhvalues[j]);
        }
        log.info("           message=" + response.getMessage());
        log.info("        remoteUser=" + request.getRemoteUser());
        log.info("            status=" + response.getStatus());
        log.info("===============================================================");

    }
View Full Code Here

Examples of org.apache.maven.doxia.logging.Log

        {
            System.out.println( "+ Error stacktraces are turned on." );
        }

        Converter converter = new DefaultConverter();
        Log log = new SystemStreamLog();
        if ( debug )
        {
            log.setLogLevel( Log.LEVEL_DEBUG );
        }
        converter.enableLogging( log );

        InputFileWrapper input;
        OutputFileWrapper output;
View Full Code Here

Examples of org.apache.maven.plugin.logging.Log

     * @throws MojoExecutionException
     */
    protected void buildArchive(Archiver archiver)
            throws ArchiverException, MojoExecutionException {
       
        Log log = getLog();
        log.debug("Using base directory: " + baseDir);
        archiver.addDirectory(buildOutputDirectory);
        if (includeDependencies) {
            log.debug("Adding dependencies ...");
            addDependencies(archiver);
        }
        if (generateMetadata) {
            log.debug("Generating XAR metadata ...");
            generateMetadata(archiver);
        }
    }
View Full Code Here

Examples of org.apache.mesos.Log

    String zkConnectString = Joiner.on(',').join(
        Iterables.transform(zkClientConfig.servers, InetSocketAddressHelper.INET_TO_STR));

    PathUtils.validatePath(ZK_LOG_GROUP_PATH.get());
    return new Log(
        QUORUM_SIZE.get(),
        logPath.getAbsolutePath(),
        zkConnectString,
        zkClientConfig.sessionTimeout.getValue(),
        zkClientConfig.sessionTimeout.getUnit().getTimeUnit(),
View Full Code Here

Examples of org.apache.openejb.client.event.Log

            }
        }
    }

    public void log(@Observes final Object event) {
        final Log log = event.getClass().getAnnotation(Log.class);

        if (log == null) {
            return;
        }

        final Logger logger = Logger.getLogger(event.getClass().getName());

        try {
            final Level level = Level.parse(log.value().name());

            if (logger.isLoggable(level)) {
                logger.log(level, event.toString());
            }
View Full Code Here

Examples of org.apache.openjpa.lib.log.Log

     * all the element's methods such that field accesses are intercepted
     * in-line.
     */
    public static void redefineClasses(OpenJPAConfiguration conf,
        final Map<Class,byte[]> classes) {
        Log log = conf.getLog(OpenJPAConfiguration.LOG_ENHANCE);
        if (classes == null || classes.size() == 0)
            return;

        Instrumentation inst = null;
        ClassFileTransformer t = null;
        try {
            inst = InstrumentationFactory.getInstrumentation();

            Class[] array = classes.keySet().toArray(new Class[classes.size()]);
            if (JavaVersions.VERSION >= 6) {
                log.trace(_loc.get("retransform-types", classes.keySet()));

                t = new ClassFileTransformer() {
                    public byte[] transform(ClassLoader loader, String clsName,
                        Class<?> classBeingRedefined, ProtectionDomain pd,
                        byte[] classfileBuffer) {
                        return classes.get(classBeingRedefined);
                    }
                };
               
                // these are Java 6 methods, and we don't have a Java 6 build
                // module yet. The cost of reflection here is negligible
                // compared to the redefinition / enhancement costs in total,
                // so this should not be a big problem.
                Method meth = inst.getClass().getMethod("addTransformer",
                    new Class[] { ClassFileTransformer.class, boolean.class });
                meth.invoke(inst, new Object[] { t, true });
                meth = inst.getClass().getMethod("retransformClasses",
                    new Class[] { array.getClass() });
                meth.invoke(inst, new Object[] { array });
            } else {
                log.trace(_loc.get("redefine-types", classes.keySet()));
                // in a Java 5 context, we can use class redefinition instead
                ClassDefinition[] defs = new ClassDefinition[array.length];
                for (int i = 0; i < defs.length; i++)
                    defs[i] = new ClassDefinition(array[i],
                        classes.get(array[i]));
View Full Code Here

Examples of org.apache.pig.piggybank.evaluation.math.LOG

          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
      }
  
   public void testLOG() throws Exception{
       EvalFunc<DataAtom> LOG = new LOG();
          Tuple tup = new Tuple(1);
          tup.setField(0, 0.5);
          DataAtom output = new DataAtom();
          LOG.exec(tup, output);
          double expected = Math.log(0.5);
          double actual = (new Double(output.strval())).doubleValue();
          assertEquals(actual, expected, delta);
   }
View Full Code Here

Examples of org.apache.sling.crankstart.core.commands.Log

    }
   
    public CrankstartFileProcessor(CrankstartContext ctx) {
        this.crankstartContext = ctx;
        builtinCommands.add(new InstallBundle());
        builtinCommands.add(new Log());
        builtinCommands.add(new SetOsgiFrameworkProperty());
        builtinCommands.add(new StartBundles());
        builtinCommands.add(new StartFramework());
        builtinCommands.add(new Configure());
        builtinCommands.add(new Defaults());
View Full Code Here
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.