Package com.skymobi.monitor.model

Examples of com.skymobi.monitor.model.Log


        response.setContentType("file/txt;charset=utf-8");
        response.addHeader("content-disposition", String.format("attachment; filename=%s.txt", java.net.URLEncoder.encode("logs", "UTF-8")));
        response.setStatus(HttpServletResponse.SC_OK);

        while (cursor.hasNext()) {
            Log log = converter.read(Log.class, cursor.next());

            response.getWriter().println(log.toString());

        }


    }
View Full Code Here


            public String call() throws Exception {
                long startTime = System.currentTimeMillis();
                //遍历游标,最长不能超过20秒
                logger.debug("游标遍历结果:");
                while (cursor.hasNext()) {
                    Log log = converter.read(Log.class, cursor.next());

                    buf.insert(0, log.toString() + "\n");
                    long current = System.currentTimeMillis();
                    if ((current - startTime) / 1000 >= mongWaitSeconds) break;
                }
                return buf.toString();
            }
View Full Code Here

TOP

Related Classes of com.skymobi.monitor.model.Log

Copyright © 2018 www.massapicom. 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.