Package com.crashnote.core.model.data

Examples of com.crashnote.core.model.data.DataArray


            res.put("level", evt.getLevel().toString());
            res.put("id", evt.getID());

            final Object[] msgArgs = evt.getArgs();
            if (msgArgs != null && msgArgs.length > 0) {
                final DataArray args = createDataArr();
                for (final Object obj : msgArgs)
                    args.add(obj.toString());
                res.putArr("messageArgs", args);
            }

            // context
            if (evt.isExcp()) {
View Full Code Here



    // INTERNALS ==================================================================================

    private DataArray collectEvts(final List<LogEvt<?>> evts) {
        final DataArray data = createDataArr();
        {
            for (final LogEvt<?> evt : evts)
                data.add(collectEvt(evt));
        }
        return data;
    }
View Full Code Here

    protected DataArray createDataArr() {
        return builder.createDataArr();
    }

    protected DataArray createDataArr(final Object[] values) {
        final DataArray arr = createDataArr();
        {
            Collections.addAll(arr, values);
        }
        return arr;
    }
View Full Code Here

        }
        return arr;
    }

    protected <T extends Object> DataArray createDataArr(final List<T> values) {
        final DataArray arr = createDataArr();
        {
            for (final Object v : values) arr.add(v);
        }
        return arr;
    }
View Full Code Here

    protected DataArray createDataArr() {
        return builder.createDataArr();
    }

    protected DataArray createDataArr(final Object[] values) {
        final DataArray arr = createDataArr();
        {
            Collections.addAll(arr, values);
        }
        return arr;
    }
View Full Code Here

        }
        return arr;
    }

    protected <T extends Object> DataArray createDataArr(final List<T> values) {
        final DataArray arr = createDataArr();
        {
            for (final Object v : values) arr.add(v);
        }
        return arr;
    }
View Full Code Here

    // INTERFACE ==================================================================================

    public DataArray collect(final Throwable th) {
        if (th == null) return null;
        final DataArray excps = createDataArr();
        {
            Throwable t = th;
            while (t != null) {
                final DataObject excp = createDataObj();
                {
                    excp.put("message", simplifyMessage(t.getMessage()));
                    excp.put("class", t.getClass().getName());

                    final DataArray trace = createDataArr();
                    for (final StackTraceElement element : t.getStackTrace()) {
                        final int line = element.getLineNumber();
                        final String method = element.getMethodName();
                        final String file = element.getFileName();
                        final String cls = element.getClassName();
                        trace.add(cls + ':' + file + ":" + method + ":" + line);
                    }
                    excp.put("stacktrace", trace);
                }
                excps.add(excp);
                t = t.getCause();
View Full Code Here

            res.put("level", evt.getLevel().toString());
            res.put("id", evt.getID());

            final Object[] msgArgs = evt.getArgs();
            if (msgArgs != null && msgArgs.length > 0) {
                final DataArray args = createDataArr();
                for (final Object obj : msgArgs)
                    args.add(obj.toString());
                res.putArr("messageArgs", args);
            }

            // context
            if (evt.isExcp()) {
View Full Code Here


    // INTERNALS ==================================================================================

    private DataArray collectEvts(final List<LogEvt<?>> evts) {
        final DataArray data = createDataArr();
        {
            for (final LogEvt<?> evt : evts)
                data.add(collectEvt(evt));
        }
        return data;
    }
View Full Code Here


    // INTERNAL ===================================================================================

    protected DataArray createDataArr(final Enumeration<?> values) {
        final DataArray arr = createDataArr();
        {
            while (values.hasMoreElements()) {
                final Object val = values.nextElement();
                arr.add(val);
            }
        }
        return arr;
    }
View Full Code Here

TOP

Related Classes of com.crashnote.core.model.data.DataArray

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.