Package de.innovationgate.wga.common

Examples of de.innovationgate.wga.common.LogLevel


            synchronized (appenderFile.getFile()) {
   
               LineNumberReader reader = null;
                try {
                    reader = new LineNumberReader(new FileReader(appenderFile.getFile()));
                    LogLevel level = LogLevel.LEVEL_INFO;
                    String line;
                   
                    // Skip lines that are below the offset
                    while (offset > (totalLinesCount + 1)) {
                        line = reader.readLine();
                        if (line == null) {
                            appenderFile.setLinesCount(reader.getLineNumber());
                            continue filesloop;
                        }
                        totalLinesCount++;
                        level = LogLevel.isolateLogLevel(line, 20, level);
                    }
   
                    int toLine = offset + size - 1;
                   
                   
                    // Read lines that are in the targeted region
                    while (totalLinesCount < toLine) {
                        line = reader.readLine();
                        if (line == null) {
                            appenderFile.setLinesCount(reader.getLineNumber());
                            continue filesloop;
                        }
                       
                        totalLinesCount++;
                        level = LogLevel.isolateLogLevel(line, 20, level);
                       
                        // Filter level
                        if (level.isHigherOrEqual(loglevel)) {
                            pageReached = true;
                           
                            // Add line break only if not on first line
                            if (firstLine) {
                                firstLine = false;
View Full Code Here


       
        String[] range = line.substring(line.indexOf(":") + 1).split("-");
        int from = Integer.parseInt((String) tokens.get(1));
        int size = Integer.parseInt((String) tokens.get(2));
       
        LogLevel level = LogLevel.getLevel((String) tokens.get(3));
        List page = handler.getPreviousPage(from, size, level);
        Iterator lines = page.iterator();
        while (lines.hasNext()) {
            w.println(lines.next());
        }
View Full Code Here

    private void processLastPageRequest(String line) throws IOException {
       
        List tokens = WGUtils.deserializeCollection(line, ":");
        int size = Integer.parseInt((String) tokens.get(1));
        LogLevel level = LogLevel.getLevel((String) tokens.get(2));
       
        List page = handler.getLastPage(size, level);
        Iterator lines = page.iterator();
        while (lines.hasNext()) {
            w.println(lines.next());
View Full Code Here

       
        String[] range = line.substring(line.indexOf(":") + 1).split("-");
        int from = Integer.parseInt((String) tokens.get(1));
        int size = Integer.parseInt((String) tokens.get(2));
       
        LogLevel level = LogLevel.getLevel((String) tokens.get(3));
        List page = handler.getPage(from, size, level);
        Iterator lines = page.iterator();
        while (lines.hasNext()) {
          w.println(lines.next());
        }
View Full Code Here

TOP

Related Classes of de.innovationgate.wga.common.LogLevel

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.