Package com.google.appengine.api.log

Examples of com.google.appengine.api.log.AppLogLine


        fooLogger.info(msg);
        flush(fooLogger);
        sync(7000);

        int retryMax = 1;
        AppLogLine appLogLine = findLogLineContaining(msg, retryMax);

        String expectedMessage = getClass().getName() + " " + methodName + ": " + msg + "\n";
        assertEquals(expectedMessage, appLogLine.getLogMessage());
    }
View Full Code Here


        log.log(Level.INFO, logMsg, new Object[] {"param1", logMark});
        flush(log);
        sync(7000);

        int retryMax = 1;
        AppLogLine logLine = findLogLineContaining(logMark, retryMax);
        assertNotNull("log with " + logMark + " should exist.", logLine);
        assertTrue("logLine should contain: " + logExpect + "but is: " + logLine,
            logLine.toString().contains(logExpect));
    }
View Full Code Here

        long afterTimeUsec = (System.currentTimeMillis() + 1) * 1000;
        flush(log);
        sync(7000);

        int retryMax = 1;
        AppLogLine logLine = findLogLineContaining(logMark, retryMax);
        assertNotNull("log with " + logMark + " should exist.", logLine);

        assertTrue("Expected logLine.getTimeUsec (" + logLine.getTimeUsec() + ") >= beforeTimeUsec (" + beforeTimeUsec + "), but it was not", logLine.getTimeUsec() >= beforeTimeUsec);
        assertTrue("Expected logLine.getTimeUsec (" + logLine.getTimeUsec() + ") <= afterTimeUsec (" + afterTimeUsec + "), but it was not", logLine.getTimeUsec() <= beforeTimeUsec);
    }
View Full Code Here

        return iterator;
    }

    protected AppLogLine findLogLine(String text, LogQuery logQuery, int retryMax) {
        for (int i = 0; i <= retryMax; i++) {
            AppLogLine line = findLogLine(text, logQuery);
            if (line != null) {
                return line;
            }
            pause(1500);
        }
View Full Code Here

        assertLogContains(text, null);
    }

    protected void assertLogContains(String text, LogService.LogLevel logLevel) {
        int retryMax = 4;
        AppLogLine logLine = findLogLineContaining(text, retryMax);
        assertNotNull("log should contain '" + text + "', but it does not", logLine);
        if (logLevel != null) {
            assertEquals("incorrect logLevel for text '" + text + "'", logLevel, logLine.getLogLevel());
        }
    }
View Full Code Here

            assertEquals("incorrect logLevel for text '" + text + "'", logLevel, logLine.getLogLevel());
        }
    }

    protected void assertLogQueryReturns(String text, LogQuery logQuery) {
        AppLogLine logLine = findLogLine(text, logQuery);
        assertNotNull("logQuery should return '" + text + "', but it does not", logLine);
    }
View Full Code Here

        AppLogLine logLine = findLogLine(text, logQuery);
        assertNotNull("logQuery should return '" + text + "', but it does not", logLine);
    }

    protected void assertLogQueryDoesNotReturn(String text, LogQuery logQuery) {
        AppLogLine logLine = findLogLine(text, logQuery);
        assertNull("logQuery should not return '" + text + "', but it does", logLine);
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.log.AppLogLine

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.