APISonar


org.codehaus.groovy.eclipse.GroovyLogManager.manager.log

> org > codehaus > groovy > eclipse > GroovyLogManager > manager > log
org APIs codehaus APIs groovy APIs eclipse APIs GroovyLogManager APIs manager APIs log APIs

Example 1
private static void log(int severity, String message, Throwable throwable) {
        final IStatus status = new Status(severity, PLUGIN_ID, 0, message, throwable);
        try {
            getDefault().getLog().log(status);
        } catch (NullPointerException e) {
            // plugin starting up or shutting down.  can ignore
        }
        if (GroovyLogManager.manager.hasLoggers()) {
            if (throwable != null) {
                GroovyLogManager.manager.log(TraceCategory.DSL, "Exception caught.  See error log.  Message: " + throwable.getLocalizedMessage());
            } else if (message != null) {
                GroovyLogManager.manager.log(TraceCategory.DSL, "Message logged.  See error log.  Message: " + message);
            }
        }
    }
Example 2
Object log(Object msg) {
        if (GroovyLogManager.manager.hasLoggers()) {
            GroovyLogManager.manager.log(TraceCategory.DSL, "========== " + msg);
        }
        return msg;
    }
Example 3
private static void trace(String message, Object... arguments) {
        if (GroovyLogManager.manager.hasLoggers()) {
            GroovyLogManager.manager.log(TraceCategory.ORGANIZE_IMPORTS, String.format(message, arguments));
        }
    }
Example 4
protected Object tryRegister(Object args) {
        Object[] nameAndClosure = extractArgsForRegister(args);
        if (nameAndClosure != null) {
            factory.registerLocalPointcut((String) nameAndClosure[0], (Closure) nameAndClosure[1]);
            return nameAndClosure[1];
        } else {
            if (GroovyLogManager.manager.hasLoggers()) {
                GroovyLogManager.manager.log(TraceCategory.DSL, "Cannot register custom pointcut for " + 
                        (args instanceof Object[] ? Arrays.toString((Object[]) args) : args));
            }
            return null;
        }
    }
Example 5
public void purgeIdentifier(IStorage identifier) {
        if (GroovyLogManager.manager.hasLoggers()) {
            GroovyLogManager.manager.log(TraceCategory.DSL, "Purging pointcut for DSL file " + identifier);
        }
        Set<IPointcut> pointcuts = keyContextMap.remove(identifier);
        if (pointcuts != null) {
            for (IPointcut pointcut : pointcuts) {
                pointcutContributionMap.remove(pointcut);
            }
        }
    }