Package org.auraframework.adapter

Examples of org.auraframework.adapter.LoggingAdapter


@Controller
public class TestLoggingAdapterController {

    @AuraEnabled
    public static void beginCapture() {
        LoggingAdapter adapter = Aura.get(LoggingAdapter.class);
        if (!(adapter instanceof TestLoggingAdapter)) {
            throw new Error("TestLoggingAdapter not configured!");
        }
        ((TestLoggingAdapter) adapter).clear();
        ((TestLoggingAdapter) adapter).beginCapture();
View Full Code Here


        ((TestLoggingAdapter) adapter).beginCapture();
    }

    @AuraEnabled
    public static List<Map<String, Object>> endCapture() {
        LoggingAdapter adapter = Aura.get(LoggingAdapter.class);
        if (!(adapter instanceof TestLoggingAdapter)) {
            throw new Error("TestLoggingAdapter not configured!");
        }
        ((TestLoggingAdapter) adapter).endCapture();
        return ((TestLoggingAdapter) adapter).getLogs();
View Full Code Here

    /**
     * Get the logging context
     */
    protected LoggingContext getLoggingContext() {
        LoggingAdapter la = AuraImpl.getLoggingAdapter();
        if (la == null || !la.isEstablished()) {
            return null;
        }
        return la.getLoggingContext();
    }
View Full Code Here

    private List<Map<String, Object>> getCspReportLogs(int expectedLogs) throws InterruptedException {
        int waitTime = 30000;
        int waitedFor = 0;
        int interval = 500;

        LoggingAdapter adapter = Aura.get(LoggingAdapter.class);
        if (!(adapter instanceof TestLoggingAdapter)) {
            throw new Error("TestLoggingAdapter not configured!");
        }
        List<Map<String, Object>> cspRecords = Lists.newArrayList();
View Full Code Here

TOP

Related Classes of org.auraframework.adapter.LoggingAdapter

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.