org.apache.logging.log4j.Logger.trace()

Here are the examples of the java api org.apache.logging.log4j.Logger.trace() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

968 Examples 7

19 Source : BatteryHealth.java
with Apache License 2.0
from WasiqB

/**
 * @param state
 * @param level
 * @author wasiqb
 * @since Oct 2, 2018
 */
public static void check(final String state, final double level) {
    log.trace("Current Battery status is [{}] with charge level as [{}%]...", state, level * 100);
    if (!state.equals("CHARGING") && !state.equals("FULL") && level < 0.2) {
        fail(NotEnoughBatteryChargeError.clreplaced, "Battery does not have enough charging, to continue, put your device on USB...");
    }
}

19 Source : AppiumServer.java
with Apache License 2.0
from WasiqB

private void initService() {
    log.trace("Initializing Appium Service started...");
    this.builder = new AppiumServiceBuilder();
    this.capabilities = new DesiredCapabilities();
    log.trace("Initializing Appium Service done...");
}

19 Source : AppiumServer.java
with Apache License 2.0
from WasiqB

/**
 * @author wasiq.bhamla
 * @since 12-Apr-2017 5:23:19 PM
 */
public void start() {
    log.trace("Starting Appium Service...");
    if (!this.setting.isExternal() && !this.setting.isCloud()) {
        boolean failure = false;
        this.service = AppiumDriverLocalService.buildService(this.builder);
        try {
            this.service.start();
        } catch (final AppiumServerHasNotBeenStartedLocallyException e) {
            failure = true;
            fail(AppiumServerNotStartingError.clreplaced, "Error occured while starting Appium server", e);
        } catch (final Exception e) {
            failure = true;
            fail(AppiumServerAlreadyRunningError.clreplaced, "Appium server is running already.", e);
        } finally {
            if (failure) {
                stop();
            }
        }
        log.trace("Appium Service Started...");
    } else {
        if (isRunning()) {
            log.trace("Appium Service is already running...");
        }
    }
}

19 Source : AppiumServer.java
with Apache License 2.0
from WasiqB

/**
 * @author wasiq.bhamla
 * @since 12-Apr-2017 5:23:39 PM
 */
public void stop() {
    log.trace("Trying to stop Appium Service...");
    if (!this.setting.isExternal() && !this.setting.isCloud()) {
        try {
            this.service.stop();
        } catch (final Exception e) {
            fail(AppiumServerNotStoppingError.clreplaced, "Error occured while stopping the server.", e);
        }
        this.service = null;
        log.trace("Appium Service Stopped...");
    } else {
        log.trace("Appium Service can only be stopped from the tool you started with...");
    }
}

19 Source : AppiumServer.java
with Apache License 2.0
from WasiqB

private void buildService() {
    log.trace("Building Appium Service started...");
    checkServerConfigParams("IP Host Address", this.setting.getHost());
    this.builder.withIPAddress(this.setting.getHost()).withStartUpTimeOut(this.setting.getStartUpTimeOutSeconds(), TimeUnit.SECONDS);
    setPort();
    setLogFile();
    setAppiumJS();
    setNodeExe();
    setCapabilities();
    setArguments();
    setEnvironmentVariables();
    log.trace("Building Appium Service done...");
}

19 Source : DeviceActivity.java
with Apache License 2.0
from WasiqB

private void load() {
    if (this.deviceElements.size() == 0) {
        log.trace("Loading elements on [{}] activity...", this.platform);
        loadElements(prepare());
    }
}

19 Source : DeviceActivity.java
with Apache License 2.0
from WasiqB

/**
 * @param name
 * @return element
 * @author wasiq.bhamla
 * @since Feb 2, 2018 1:44:52 PM
 */
public MobileElement getElement(final String name) {
    load();
    log.trace("Getting element with name [{}]...", name);
    return findElements(getDeviceElement(name));
}

19 Source : Device.java
with Apache License 2.0
from WasiqB

/**
 * @return driver
 *
 * @author wasiq.bhamla
 * @since 01-May-2017 7:08:10 PM
 */
public D getDriver() {
    LOG.trace("Getting [{}] device driver...", this.platform);
    return this.driver;
}

19 Source : Device.java
with Apache License 2.0
from WasiqB

private void quitApp() {
    LOG.trace("Closing & Quitting [{}] device driver...", this.platform);
    try {
        this.driver.closeApp();
        this.driver.quit();
    } catch (final NoSuchSessionException e) {
        fail(AppiumServerStoppedError.clreplaced, SERVER_STOPPED, e);
    } catch (final Exception e) {
        fail(DeviceDriverNotStoppingError.clreplaced, "Error occured while stopping device driver.", e);
    }
}

19 Source : Device.java
with Apache License 2.0
from WasiqB

/**
 * @author wasiq.bhamla
 * @since 17-Apr-2017 4:46:02 PM
 */
public void stop() {
    if (this.driver != null) {
        quitApp();
        this.driver = null;
    } else {
        LOG.trace("[{}] device driver already stopped...", this.platform);
    }
}

19 Source : Device.java
with Apache License 2.0
from WasiqB

private void startDriver() {
    LOG.trace("Starting [{}] device driver...", this.platform);
    try {
        this.driver = init(this.server.getServiceUrl(), this.capabilities);
    } catch (final Exception e) {
        fail(DeviceDriverNotStartingError.clreplaced, "Error occured starting device driver", e);
    }
}

19 Source : App.java
with Apache License 2.0
from VertaAI

public static void initializeBackendServices(ServerBuilder<?> serverBuilder, ServiceSet services, DAOSet daos) {
    wrapService(serverBuilder, new ProjectServiceImpl(services, daos));
    LOGGER.trace("Project serviceImpl initialized");
    wrapService(serverBuilder, new ExperimentServiceImpl(services, daos));
    LOGGER.trace("Experiment serviceImpl initialized");
    wrapService(serverBuilder, new ExperimentRunServiceImpl(services, daos));
    LOGGER.trace("ExperimentRun serviceImpl initialized");
    wrapService(serverBuilder, new CommentServiceImpl(services, daos));
    LOGGER.trace("Comment serviceImpl initialized");
    wrapService(serverBuilder, new DatasetServiceImpl(services, daos));
    LOGGER.trace("Dataset serviceImpl initialized");
    wrapService(serverBuilder, new DatasetVersionServiceImpl(services, daos));
    LOGGER.trace("Dataset Version serviceImpl initialized");
    wrapService(serverBuilder, new AdvancedServiceImpl(services, daos));
    LOGGER.trace("Hydrated serviceImpl initialized");
    wrapService(serverBuilder, new LineageServiceImpl(daos));
    LOGGER.trace("Lineage serviceImpl initialized");
    wrapService(serverBuilder, new VersioningServiceImpl(services, daos, new FileHasher()));
    LOGGER.trace("Versioning serviceImpl initialized");
    wrapService(serverBuilder, new MetadataServiceImpl(daos));
    LOGGER.trace("Metadata serviceImpl initialized");
    LOGGER.info("All services initialized and resolved dependency before server start");
}

19 Source : CommonHibernateUtil.java
with Apache License 2.0
from VertaAI

private SessionFactory loopBack(SessionFactory sessionFactory) {
    try {
        LOGGER.trace("CommonHibernateUtil checking DB connection");
        boolean dbConnectionLive = checkDBConnection(databaseConfig.RdbConfiguration, databaseConfig.timeout);
        if (dbConnectionLive) {
            return sessionFactory;
        }
        // Check DB connection based on the periodic time logic
        checkDBConnectionInLoop(false);
        sessionFactory = resetSessionFactory();
        LOGGER.trace("CommonHibernateUtil getSessionFactory() DB connection got successfully");
        return sessionFactory;
    } catch (Exception ex) {
        LOGGER.warn("CommonHibernateUtil loopBack() getting error ", ex);
        throw new UnavailableException(ex.getMessage());
    }
}

19 Source : FabLog.java
with MIT License
from unascribed

public static void trace(String message) {
    log.trace(prefix(message));
}

19 Source : FabLog.java
with MIT License
from unascribed

public static void trace(String message, Throwable t) {
    log.trace(prefix(message), t);
}

19 Source : ThriftOperation.java
with Apache License 2.0
from timveil

public void cancel() {
    if (!closed.get()) {
        log.trace("attempting to cancel {}", this.getClreplaced().getName());
        cancelOperation();
    }
}

19 Source : NettyTCPTransportImpl.java
with Apache License 2.0
from radixdlt

private Thread createThread(Runnable r) {
    String threadName = String.format("TCP handler %s - %s", localAddress(), threadCounter.incrementAndGet());
    log.trace("New thread: {}", threadName);
    return new Thread(r, threadName);
}

19 Source : MessageDispatcher.java
with Apache License 2.0
from radixdlt

private boolean handleSignedMessage(Optional<PeerWithSystem> peer, SignedMessage signedMessage) {
    String messageType = signedMessage.getClreplaced().getSimpleName();
    return peer.map(p -> {
        if (!checkSignature(signedMessage, p.getSystem())) {
            log.warn("Ignoring {} message from {} - bad signature", messageType, peer);
            this.counters.increment(CounterType.MESSAGES_INBOUND_BADSIGNATURE);
            return false;
        }
        log.trace("Good signature on {} message from {}", messageType, peer);
        return true;
    }).orElse(false);
}

19 Source : PeerManager.java
with Apache License 2.0
from radixdlt

private void handleHeartbeatPeersMessage(Peer peer, SystemMessage heartBeatMessage) {
    log.trace("Received SystemMessage from {}", peer);
}

19 Source : Pacemaker.java
with Apache License 2.0
from radixdlt

private void startView() {
    this.isViewTimedOut = false;
    this.timeoutVoteVertexId = Optional.empty();
    long timeout = timeoutCalculator.timeout(latestViewUpdate.uncommittedViewsCount());
    ScheduledLocalTimeout scheduledLocalTimeout = ScheduledLocalTimeout.create(latestViewUpdate, timeout);
    this.timeoutSender.dispatch(scheduledLocalTimeout, timeout);
    final BFTNode currentViewProposer = latestViewUpdate.getLeader();
    if (this.self.equals(currentViewProposer)) {
        Optional<Proposal> proposalMaybe = generateProposal(latestViewUpdate.getCurrentView());
        proposalMaybe.ifPresent(proposal -> {
            log.trace("Broadcasting proposal: {}", proposal);
            this.proposalBroadcaster.broadcastProposal(proposal, this.validatorSet.nodes());
            this.counters.increment(CounterType.BFT_PROPOSALS_MADE);
        });
    }
}

19 Source : EpochManager.java
with Apache License 2.0
from radixdlt

public void processGetEpochResponse(GetEpochResponse response) {
    log.trace("GET_EPOCH_RESPONSE: {}", response);
    if (response.getEpochProof() == null) {
        log.warn("Received empty GetEpochResponse {}", response);
        // TODO: retry
        return;
    }
    final VerifiedLedgerHeaderAndProof ancestor = response.getEpochProof();
    if (ancestor.getEpoch() >= this.currentEpoch()) {
        localSyncRequestProcessor.dispatch(new LocalSyncRequest(ancestor, ImmutableList.of(response.getAuthor())));
    } else {
        if (ancestor.getEpoch() + 1 < this.currentEpoch()) {
            log.info("Ignoring old epoch {} current {}", response, this.currentEpoch);
        }
    }
}

19 Source : EpochManager.java
with Apache License 2.0
from radixdlt

public void processGetEpochRequest(GetEpochRequest request) {
    log.trace("{}: GET_EPOCH_REQUEST: {}", this.self, request);
    if (this.currentEpoch() > request.getEpoch()) {
        epochsRPCSender.sendGetEpochResponse(request.getAuthor(), this.currentEpoch.getProof());
    } else {
        log.warn("{}: GET_EPOCH_REQUEST: {} but currently on epoch: {}", this.self::getSimpleName, () -> request, this::currentEpoch);
        // TODO: Send better error message back
        epochsRPCSender.sendGetEpochResponse(request.getAuthor(), null);
    }
}

19 Source : LocalSyncService.java
with Apache License 2.0
from radixdlt

private SyncState processStatusResponse(SyncCheckState currentState, BFTNode peer, StatusResponse statusResponse) {
    log.trace("LocalSync: Received status response {} from peer {}", statusResponse, peer);
    if (!currentState.hasAskedPeer(peer)) {
        // we didn't ask this peer
        return currentState;
    }
    if (currentState.receivedResponseFrom(peer)) {
        // already got the response from this peer
        return currentState;
    }
    final var newState = currentState.withStatusResponse(peer, statusResponse);
    if (newState.gotAllResponses()) {
        // we've got all the responses
        return processPeerStatusResponsesAndStartSyncIfNeeded(newState);
    } else {
        return newState;
    }
}

19 Source : LocalSyncService.java
with Apache License 2.0
from radixdlt

private SyncState startSync(SyncState currentState, ImmutableList<BFTNode> candidatePeers, VerifiedLedgerHeaderAndProof targetHeader) {
    log.trace("LocalSync: Syncing to target header {}, got {} candidate peers", targetHeader, candidatePeers.size());
    return this.processSync(SyncingState.init(currentState.getCurrentHeader(), candidatePeers, targetHeader));
}

19 Source : EpochManager.java
with Apache License 2.0
from radixdlt

public void processGetEpochResponse(GetEpochResponse response) {
    log.trace("GET_EPOCH_RESPONSE: {}", response);
    if (response.getEpochProof() == null) {
        log.warn("Received empty GetEpochResponse {}", response);
        // TODO: retry
        return;
    }
    final VerifiedLedgerHeaderAndProof ancestor = response.getEpochProof();
    if (ancestor.getEpoch() >= this.currentEpoch()) {
        ImmutableList<BFTNode> signers = ImmutableList.of(response.getAuthor());
        localSyncRequestEventDispatcher.dispatch(new LocalSyncRequest(ancestor, signers));
    } else {
        if (ancestor.getEpoch() + 1 < this.currentEpoch()) {
            log.info("Ignoring old epoch {} current {}", response, this.currentEpoch);
        }
    }
}

19 Source : EpochManager.java
with Apache License 2.0
from radixdlt

public EventProcessor<EpochViewUpdate> epochViewUpdateEventProcessor() {
    return epochViewUpdate -> {
        if (epochViewUpdate.getEpoch() != this.currentEpoch()) {
            return;
        }
        log.trace("Processing ViewUpdate: {}", epochViewUpdate);
        bftEventProcessor.processViewUpdate(epochViewUpdate.getViewUpdate());
    };
}

19 Source : OracleManagerCDC.java
with Apache License 2.0
from osalvador

@Override
public void handleBatch(List<RecordChangeEvent<SourceRecord>> records, DebeziumEngine.RecordCommitter<RecordChangeEvent<SourceRecord>> committer) throws InterruptedException {
    LOG.info("New records received: {}", records.size());
    // batch operations
    Envelope.Operation oldOperation = null;
    String oldSinkTableName = null;
    for (RecordChangeEvent<SourceRecord> r : records) {
        SourceRecord record = r.record();
        if (record.value() != null) {
            LOG.debug(record);
            Envelope.Operation operation = Envelope.operationFor(record);
            if (operation != null) {
                try {
                    // if the operation OR de sink table changes execute bath operations
                    // TODO la tabla no lleva esquema, peude haber varias tablas con el mismo nombre en diferente esquema...
                    if (batchPS != null) {
                        LOG.trace("batchPS es nulo");
                        LOG.trace("oldOperation: {}, newOperation: {}", oldOperation, operation);
                        LOG.trace("oldSinkTableName: {}, newSinkTableName: {}", oldSinkTableName, getSourceTableName(record));
                        if ((oldOperation != null && !oldOperation.equals(operation)) || (oldSinkTableName != null && !oldSinkTableName.equals(getSourceTableName(record)))) {
                            int[] rows = batchPS.executeBatch();
                            this.getConnection().commit();
                            LOG.info("Commited batch records. Rows affected: {}", rows.length);
                            batchPS.close();
                            batchPS = null;
                        }
                    }
                    switch(operation) {
                        case READ:
                            LOG.trace("Read event. Snapshoting - Insert?? Merge??");
                            doInsert(record);
                            break;
                        case CREATE:
                            LOG.trace("Create event. Insert");
                            doInsert(record);
                            break;
                        case DELETE:
                            LOG.trace("Delete event. Delete");
                            doDelete(record);
                            break;
                        case UPDATE:
                            LOG.trace("Update event. Update");
                            doUpdate(record);
                            break;
                        default:
                            break;
                    }
                } catch (Exception throwables) {
                    throwables.printStackTrace();
                }
                oldOperation = operation;
                oldSinkTableName = getSourceTableName(record);
            }
        }
        /*
            // table settings
            String table = getSourceTableName(record.value());
            System.out.println(table);

            Struct value = ((Struct) record.value()).getStruct("after");

            for (Field field : value.schema().fields()) {
                System.out.println(field.name() + "=" + field.schema().type().getName());
                System.out.println(field.name() + "=" + value.get(field));
            }
            System.out.println("----");


            //System.out.println("Key = '" + record.key() + "' value = '" + record.value() + "'");

*/
        committer.markProcessed(r);
    }
    // Commit transactions
    try {
        if (batchPS != null) {
            int[] rows = batchPS.executeBatch();
            this.getConnection().commit();
            LOG.info("Commited all records. Rows affected: {}", rows.length);
        }
    } catch (SQLException throwables) {
        throwables.printStackTrace();
    } finally {
        try {
            if (batchPS != null)
                batchPS.close();
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        batchPS = null;
    }
    committer.markBatchFinished();
// for (SourceRecord record : list) {
// System.out.println(record.value());
// for (Field campo : record.valueSchema().fields()){
// System.out.println(campo.name());
// /* before
// after
// source
// op
// ts_ms */
// }
// Struct struct = (Struct)record.value();
// Struct after = (Struct)struct.get("after");
// System.out.println(after.schema().fields());
// recordCommitter.markProcessed(record);
// }
// recordCommitter.markBatchFinished();
}

19 Source : IndexResolverReplacer.java
with Apache License 2.0
from opendistro-for-elasticsearch

private boolean checkIndices(Object request, String[] indices, boolean needsToBeSizeOne, boolean allowEmpty) {
    if (indices == IndicesProvider.NOOP) {
        return false;
    }
    if (!allowEmpty && (indices == null || indices.length == 0)) {
        if (log.isTraceEnabled() && request != null) {
            log.trace("Null or empty indices for " + request.getClreplaced().getName());
        }
        return false;
    }
    if (!allowEmpty && needsToBeSizeOne && indices.length != 1) {
        if (log.isTraceEnabled() && request != null) {
            log.trace("To much indices for " + request.getClreplaced().getName());
        }
        return false;
    }
    for (int i = 0; i < indices.length; i++) {
        final String index = indices[i];
        if (index == null || index.isEmpty()) {
            // not allowed
            if (log.isTraceEnabled() && request != null) {
                log.trace("At least one null or empty index for " + request.getClreplaced().getName());
            }
            return false;
        }
    }
    return true;
}

19 Source : AbstractAuditLog.java
with Apache License 2.0
from opendistro-for-elasticsearch

private boolean checkComplianceFilter(final AuditCategory category, final String effectiveUser, Origin origin, ComplianceConfig complianceConfig) {
    if (log.isTraceEnabled()) {
        log.trace("Check for COMPLIANCE category:{}, effectiveUser:{}, origin: {}", category, effectiveUser, origin);
    }
    if (origin == Origin.LOCAL && effectiveUser == null && category != AuditCategory.COMPLIANCE_EXTERNAL_CONFIG) {
        if (log.isTraceEnabled()) {
            log.trace("Skipped compliance log message because of null user and local origin");
        }
        return false;
    }
    if (category == AuditCategory.COMPLIANCE_DOC_READ || category == AuditCategory.COMPLIANCE_INTERNAL_CONFIG_READ) {
        if (effectiveUser != null && complianceConfig.isComplianceReadAuditDisabled(effectiveUser)) {
            if (log.isTraceEnabled()) {
                log.trace("Skipped compliance log message because of user {} is ignored", effectiveUser);
            }
            return false;
        }
    }
    if (category == AuditCategory.COMPLIANCE_DOC_WRITE || category == AuditCategory.COMPLIANCE_INTERNAL_CONFIG_WRITE) {
        if (effectiveUser != null && complianceConfig.isComplianceWriteAuditDisabled(effectiveUser)) {
            if (log.isTraceEnabled()) {
                log.trace("Skipped compliance log message because of user {} is ignored", effectiveUser);
            }
            return false;
        }
    }
    return true;
}

19 Source : UnitImpl.java
with GNU Lesser General Public License v3.0
from OpenBW

public int getDistance(Unit target) {
    if (this.position == target.getPosition()) {
        return 0;
    }
    int xDist = getLeft() - (target.getRight() + 1);
    if (xDist < 0) {
        xDist = target.getLeft() - (getRight() + 1);
        if (xDist < 0) {
            xDist = 0;
        }
    }
    int yDist = getTop() - (target.getBottom() + 1);
    if (yDist < 0) {
        yDist = target.getTop() - (getBottom() + 1);
        if (yDist < 0) {
            yDist = 0;
        }
    }
    logger.trace("dx, dy: {}, {}.", xDist, yDist);
    return new Position(0, 0).getDistance(new Position(xDist, yDist));
}

19 Source : BW.java
with GNU Lesser General Public License v3.0
from OpenBW

private void preFrame() {
    // logger.trace("updating game state for frame {}...", this.frame);
    updateGame();
    logger.trace("updated game.");
    updateAllPlayers();
    logger.trace("updated players.");
    updateAllUnits(getInteractionHandler().getFrameCount());
    logger.trace("updated all units.");
    updateAllBullets();
    logger.trace("updated all bullets.");
}

19 Source : VirtDataFunctionResolver.java
with Apache License 2.0
from nosqlbench

private boolean canreplacedignArguments(Constructor<?> targetCtor, Object[] sourceParameters) {
    boolean isreplacedignable = true;
    Clreplaced<?>[] targetTypes = targetCtor.getParameterTypes();
    if (targetCtor.isVarArgs()) {
        if (sourceParameters.length < (targetTypes.length - 1)) {
            logger.trace(targetCtor.toString() + " (varargs) does not match, not enough source parameters: " + Arrays.toString(sourceParameters));
            return false;
        }
    } else if (sourceParameters.length != targetTypes.length) {
        logger.trace(targetCtor.toString() + " (varargs) does not match source parameters (size): " + Arrays.toString(sourceParameters));
        return false;
    }
    Clreplaced<?>[] sourceTypes = new Clreplaced<?>[sourceParameters.length];
    for (int i = 0; i < sourceTypes.length; i++) {
        sourceTypes[i] = sourceParameters[i].getClreplaced();
    }
    if (targetCtor.isVarArgs()) {
        for (int i = 0; i < targetTypes.length - 1; i++) {
            if (!ClreplacedUtils.isreplacedignable(sourceTypes[i], targetTypes[i])) {
                isreplacedignable = false;
                break;
            }
        }
        Clreplaced<?> componentType = targetTypes[targetTypes.length - 1].getComponentType();
        for (int i = targetTypes.length - 1; i < sourceTypes.length; i++) {
            if (!ClreplacedUtils.isreplacedignable(sourceTypes[i], componentType, true)) {
                isreplacedignable = false;
                break;
            }
        }
    } else {
        for (int i = 0; i < targetTypes.length; i++) {
            if (!ClreplacedUtils.isreplacedignable(sourceTypes[i], targetTypes[i])) {
                isreplacedignable = false;
                break;
            }
        }
    // 
    // isreplacedignable = ClreplacedUtils.isreplacedignable(sourceTypes, targetTypes, true);
    }
    return isreplacedignable;
}

19 Source : VirtDataComposer.java
with Apache License 2.0
from nosqlbench

private void removeNonLongFunctions(List<ResolvedFunction> funcs) {
    List<ResolvedFunction> toRemove = new LinkedList<>();
    for (ResolvedFunction func : funcs) {
        if (!func.getInputClreplaced().isreplacedignableFrom(long.clreplaced)) {
            logger.trace("input type " + func.getInputClreplaced().getCanonicalName() + " is not replacedignable from long");
            toRemove.add(func);
        }
    }
    if (toRemove.size() > 0 && toRemove.size() == funcs.size()) {
        throw new RuntimeException("removeNonLongFunctions would remove all functions: " + funcs);
    }
    funcs.removeAll(toRemove);
}

19 Source : VirtDataComposer.java
with Apache License 2.0
from nosqlbench

private int reduceByRequiredResultsType(List<ResolvedFunction> endFuncs, Clreplaced<?> resultType) {
    int progressed = 0;
    LinkedList<ResolvedFunction> tmpList = new LinkedList<>(endFuncs);
    for (ResolvedFunction endFunc : tmpList) {
        if (resultType != null && !ClreplacedUtils.isreplacedignable(endFunc.getResultClreplaced(), resultType, true)) {
            endFuncs.remove(endFunc);
            String logmsg = "BY-REQUIRED-RESULT-TYPE removed function '" + endFunc + "' because is not replacedignable to " + resultType;
            logger.trace(logmsg);
            progressed++;
        }
    }
    if (endFuncs.size() == 0) {
        throw new RuntimeException("BY-REQUIRED-RESULT-TYPE No end funcs were found which are replacedignable to " + resultType);
    }
    return progressed;
}

19 Source : ResolverDiagnostics.java
with Apache License 2.0
from nosqlbench

public ResolverDiagnostics trace(String s) {
    logger.trace(s);
    log.append(s).append("\n");
    return this;
}

19 Source : ActivityExecutor.java
with Apache License 2.0
from nosqlbench

private boolean awaitAnyRequiredMotorState(int waitTime, int pollTime, RunState... awaitingState) {
    long startedAt = System.currentTimeMillis();
    while (System.currentTimeMillis() < (startedAt + waitTime)) {
        for (Motor motor : motors) {
            for (RunState state : awaitingState) {
                if (motor.getSlotStateTracker().getSlotState() == state) {
                    logger.trace("at least one 'any' of " + activityDef.getAlias() + "/Motor[" + motor.getSlotId() + "] is now in state " + motor.getSlotStateTracker().getSlotState());
                    return true;
                }
            }
        }
        try {
            Thread.sleep(pollTime);
        } catch (InterruptedException ignored) {
        }
    }
    logger.trace("none of " + activityDef.getAlias() + "/Motor [" + motors.size() + "] is in states in " + Arrays.asList(awaitingState));
    return false;
}

19 Source : ActivityExecutor.java
with Apache License 2.0
from nosqlbench

private boolean awaitAllRequiredMotorState(int waitTime, int pollTime, RunState... awaitingState) {
    long startedAt = System.currentTimeMillis();
    boolean awaited = false;
    while (!awaited && (System.currentTimeMillis() < (startedAt + waitTime))) {
        awaited = true;
        for (Motor motor : motors) {
            awaited = awaitMotorState(motor, waitTime, pollTime, awaitingState);
            if (!awaited) {
                logger.trace("failed awaiting motor " + motor.getSlotId() + " for state in " + Arrays.asList(awaitingState));
                break;
            }
        }
    }
    return awaited;
}

19 Source : ActivityMetrics.java
with Apache License 2.0
from nosqlbench

/**
 * This should be called at the end of a process, so that open intervals can be finished, logs closed properly,
 * etc.
 * @param showChart whether to chart metrics on console
 */
public static void closeMetrics(boolean showChart) {
    logger.trace("Closing all registered metrics closable objects.");
    for (MetricsCloseable metricsCloseable : metricsCloseables) {
        logger.trace("closing metrics closeable: " + metricsCloseable);
        metricsCloseable.closeMetrics();
        if (showChart) {
            metricsCloseable.chart();
        }
    }
}

19 Source : ParameterMap.java
with Apache License 2.0
from nosqlbench

private void callListeners() {
    for (Listener listener : listeners) {
        logger.trace("calling listener:" + listener);
        listener.handleParameterMapUpdate(this);
    }
}

19 Source : SequencePlanner.java
with Apache License 2.0
from nosqlbench

public OpSequence<T> resolve() {
    switch(sequencerType) {
        case bucket:
            logger.trace("sequencing elements by simple round-robin");
            this.elementIndex = new BucketSequencer<T>().seqIndexesByRatios(elements, ratios);
            break;
        case interval:
            logger.trace("sequencing elements by interval and position");
            this.elementIndex = new IntervalSequencer<T>().seqIndexesByRatios(elements, ratios);
            break;
        case concat:
            logger.trace("sequencing elements by concatenation");
            this.elementIndex = new ConcatSequencer<T>().seqIndexesByRatios(elements, ratios);
    }
    this.elements = elements;
    return new Sequence<>(sequencerType, elements, elementIndex);
}

19 Source : JmxOp.java
with Apache License 2.0
from nosqlbench

protected Object readObject(String attributeName) {
    try {
        Object value = getMBeanConnection().getAttribute(objectName, attributeName);
        logger.trace("read attribute '" + value + "': " + value);
        return value;
    } catch (Exception e) {
        throw new RuntimeException(e);
    }
}

19 Source : DiagAction.java
with Apache License 2.0
from nosqlbench

/**
 * idempotently replacedign the last append reference time and the interval which, when added to it, represent when this
 * diagnostic thread should takeUpTo its turn to log cycle info. Also, append the modulo parameter.
 */
private void updateReportTime() {
    reportModulo = activityDef.getParams().getOptionalLong("modulo").orElse(10000000L);
    lastUpdate = System.currentTimeMillis() - calculateOffset(slot, activityDef);
    quantizedInterval = calculateInterval(activityDef);
    logger.trace("updating report time for slot:" + slot + ", def:" + activityDef + " to " + quantizedInterval + ", and modulo " + reportModulo);
}

19 Source : AnswerStrategyWithCallback.java
with Apache License 2.0
from Nexmo

private String handleOutboundAnswerFromCustomerForCallbackTask(String taskId) {
    LOGGER.trace("handleOutboundAnswerFromCustomerForCallbackTask");
    TaskDto task = getTask(taskId);
    if (null != task) {
        if (this.withFeatureRecordName) {
            String recordingUrl = attributeGroupDtogetString(KEY_RECORDING_URL, task.getUserContext());
            // TODO: check if string is valid URL
            if (null != recordingUrl && recordingUrl.length() > 0) {
                return respondOutboundByPromptCustomerName(task, recordingUrl);
            }
        }
        return respondOutboundByConnectCustomer(task);
    }
    return respondWithErrorTalkNcco();
}

19 Source : AnswerStrategyWithCallback.java
with Apache License 2.0
from Nexmo

private TaskDto getTask(String taskRef) {
    TaskDto task = null;
    try {
        RouterObjectRef routerObjectId = new RouterObjectRef(taskRef, getRouterId());
        task = taskServiceClient.get(routerObjectId);
        LOGGER.trace("task:{}", task);
    } catch (CommsRouterException e) {
        e.printStackTrace();
    } catch (Exception ex) {
        ex.printStackTrace();
    }
    return task;
}

19 Source : NexMoEventResource.java
with Apache License 2.0
from Nexmo

private void handleCustomerCallEvent(NexmoCallEvent callEvent) {
    LOGGER.trace("handleCustomerCallEvent");
    switch(callEvent.getStatus()) {
        case STARTED:
            break;
        case RINGING:
            break;
        case ANSWERED:
            handleCustomerAnsweredCallEvent(callEvent);
            break;
        case MACHINE:
            break;
        case COMPLETED:
            handleCustomerCompletedCallEvent(callEvent);
            break;
        case TIMEOUT:
        case FAILED:
        case REJECTED:
        case CANCELLED:
        case BUSY:
            handleCustomerFailedCallEvent(callEvent);
            break;
        default:
            break;
    }
}

19 Source : PcodeCompile.java
with Apache License 2.0
from NationalSecurityAgency

public static void entry(String name, Object... args) {
    StringBuilder sb = new StringBuilder();
    sb.append(name).append("(");
    sb.append(Arrays.stream(args).map(Object::toString).collect(Collectors.joining(", ")));
    sb.append(")");
    log.trace(sb.toString());
}

19 Source : VisualGraphJobRunnerTest.java
with Apache License 2.0
from NationalSecurityAgency

private void waitForJobRunner(long maxTime) {
    logger.trace("\n\n@Test - done scheduling jobs; waiting for completion\n\n");
    long total = 0;
    while (jobRunner.isBusy() && total < maxTime) {
        total += sleep(DEFAULT_WAIT_DELAY);
        if (total >= maxTime) {
            throw new replacedertException("Timed-out waiting for graph job runner to finish");
        }
    }
    logger.trace("\n\n\t@Test - done waiting\n\n");
}

19 Source : AbstractAnimatorJob.java
with Apache License 2.0
from NationalSecurityAgency

protected void trace(String message) {
    log.trace(message + " " + getClreplaced().getSimpleName() + " (" + System.idenreplacedyHashCode(this) + ")\t");
}

19 Source : ClassLocation.java
with Apache License 2.0
from NationalSecurityAgency

void checkForDuplicates(Set<Clreplaced<?>> existingClreplacedes) {
    if (!log.isTraceEnabled()) {
        return;
    }
    for (Clreplaced<?> c : clreplacedes) {
        if (existingClreplacedes.contains(c)) {
            Module module = c.getModule();
            module.toString();
            log.trace("Attempting to load the same clreplaced twice: {}.  " + "Keeping loaded clreplaced ; ignoring clreplaced from {}", c, this);
            return;
        }
    }
}

19 Source : RowObjectSelectionManager.java
with Apache License 2.0
from NationalSecurityAgency

private void trace(String s, Throwable t) {
    Throwable filtered = t == null ? null : ReflectionUtilities.filterJavaThrowable(t);
    log.trace(s, filtered);
}

See More Examples