gpt4 book ai didi

com.asakusafw.yaess.core.YaessLogger类的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 07:50:49 24 4
gpt4 key购买 nike

本文整理了Java中com.asakusafw.yaess.core.YaessLogger类的一些代码示例,展示了YaessLogger类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YaessLogger类的具体详情如下:
包路径:com.asakusafw.yaess.core.YaessLogger
类名称:YaessLogger

YaessLogger介绍

[英]Wraps logger facility.
[中]

代码示例

代码示例来源:origin: asakusafw/asakusafw

YSLOG.info("I01000", batchId);
long start = System.currentTimeMillis();
try {
    batchScheduler.run();
  YSLOG.info("I01001", batchId);
} catch (ExitCodeException e) {
  YSLOG.error("E01001", batchId);
  throw e;
} catch (IOException e) {
  YSLOG.error(e, "E01001", batchId);
  throw e;
} catch (InterruptedException e) {
  YSLOG.warn(e, "W01001", batchId);
  throw e;
} finally {
  long end = System.currentTimeMillis();
  YSLOG.info("I01999", batchId, end - start);

代码示例来源:origin: asakusafw/asakusafw

private String message(String code, Object... arguments) {
  assert code != null;
  assert arguments != null;
  String message = getMessage(code, arguments);
  return format.format(new Object[] { componentName, code, message });
}

代码示例来源:origin: asakusafw/asakusafw

/**
 * Log a message at WARN level.
 * @param code the message code
 * @param arguments the arguments
 * @throws IllegalArgumentException if some parameters were {@code null}
 */
public void warn(String code, Object... arguments) {
  if (internal.isWarnEnabled()) {
    String message = message(code, arguments);
    internal.warn(message);
  }
}

代码示例来源:origin: asakusafw/asakusafw

private static File findCustomProfile(File file, String customProfileName) {
  if (customProfileName == null) {
    return file;
  }
  String fileName = file.getName();
  int index = fileName.lastIndexOf('.');
  String extension = ""; //$NON-NLS-1$
  if (index >= 0) {
    extension = fileName.substring(index);
  }
  File result = new File(file.getParentFile(), customProfileName + extension);
  YSLOG.info("I01001", //$NON-NLS-1$
      result);
  return result;
}

代码示例来源:origin: asakusafw/asakusafw

YSLOG.info("I00001", user, host, port, privateKey);
long sessionStart = System.currentTimeMillis();
session.connect((int) TimeUnit.SECONDS.toMillis(60));
long sessionEnd = System.currentTimeMillis();
YSLOG.info("I00002", user, host, port, privateKey, sessionEnd - sessionStart);
try {
  Map<String, String> newEnv = resolveBlobs(session, environmentVariables, extensions, output);
YSLOG.error(e, "E00001", user, host, port, privateKey);
throw e;

代码示例来源:origin: asakusafw/asakusafw

private void closeFile() {
  try {
    this.file.close();
  } catch (IOException e) {
    YSLOG.warn(e, "W41002", label, path);
  }
}

代码示例来源:origin: asakusafw/asakusafw

YSLOG.info("I01004", batchId);
for (FlowScriptTask task : running.values()) {
  task.cancel(true);
    waitForComplete();
  } catch (IOException e) {
    YSLOG.warn(e, "W01002", batchId);

代码示例来源:origin: asakusafw/asakusafw

@Override
public synchronized void beginFlow(String flowId, String executionId) throws IOException {
  if (flowId == null) {
    throw new IllegalArgumentException("flowId must not be null"); //$NON-NLS-1$
  }
  if (executionId == null) {
    throw new IllegalArgumentException("executionId must not be null"); //$NON-NLS-1$
  }
  if (closed) {
    throw new IOException("Lock manager is already closed");
  }
  LockObject other = flowLocks.get(flowId);
  if (other != null) {
    YSLOG.error("E41002", batchId, flowId, executionId, lockScope);
    throw new IOException(MessageFormat.format(
        "Failed to lock target flow (re-entrant): {0} ({1})",
        flowId,
        other.label));
  }
  try {
    LockObject lock = acquireForFlow(flowId, executionId);
    if (lock != null) {
      flowLocks.put(flowId, lock);
    }
  } catch (IOException e) {
    YSLOG.error("E41002", batchId, flowId, executionId, lockScope);
    throw e;
  }
}

代码示例来源:origin: asakusafw/asakusafw

/**
 * Program entry.
 * @param args program arguments
 */
public static void main(String... args) {
  CommandLineUtil.prepareLogContext();
  YSLOG.info("I00000");
  long start = System.currentTimeMillis();
  int status = execute(args);
  long end = System.currentTimeMillis();
  YSLOG.info("I00999", status, end - start);
  System.exit(status);
}

代码示例来源:origin: asakusafw/asakusafw

System.out.printf("    %s%n", phase.getSymbol());
  YSLOG.error(e, "E00001", Arrays.toString(args));
  return 1;
        conf.arguments, conf.definitions, blobs);
  } catch (Exception e) {
    YSLOG.error(e, "E00002", conf);
    return 1;
  YSLOG.info("I00001", conf);
  switch (conf.mode) {
  case BATCH:
  YSLOG.error("E00003", conf);
  return 1;
} catch (Exception e) {
  YSLOG.error(e, "E00003", conf);
  return 1;
} finally {

代码示例来源:origin: asakusafw/asakusafw

private void deleteFile() {
    // FIXME more safe
    if (path.delete() == false) {
      YSLOG.warn("W41003", label, path);
    }
  }
}

代码示例来源:origin: asakusafw/asakusafw

ExecutorService executor = resourceExecutors.get(resourceId);
if (executor == null) {
  YSLOG.warn("W01001",
      context.getBatchId(),
      context.getFlowId(),
  executor = defaultExecutor;
} else {
  YSLOG.info("I01001",
      context.getBatchId(),
      context.getFlowId(),

代码示例来源:origin: asakusafw/asakusafw

/**
 * Creates a new instance.
 * @param lockScope lock scope
 * @param batchId target batch ID
 * @param directory base directory for lock files, must exist
 * @throws IOException if failed to create instance
 * @throws IllegalArgumentException if some parameters were {@code null}
 */
FileExecutionLock(Scope lockScope, String batchId, File directory) throws IOException {
  if (lockScope == null) {
    throw new IllegalArgumentException("lockScope must not be null"); //$NON-NLS-1$
  }
  if (batchId == null) {
    throw new IllegalArgumentException("batchId must not be null"); //$NON-NLS-1$
  }
  if (directory == null) {
    throw new IllegalArgumentException("directory must not be null"); //$NON-NLS-1$
  }
  this.lockScope = lockScope;
  this.batchId = batchId;
  this.directory = directory;
  this.flowLocks = new HashMap<>();
  try {
    this.batchLock = acquireForBatch();
  } catch (IOException e) {
    YSLOG.error("E41001", batchId, lockScope);
    throw e;
  }
}

代码示例来源:origin: asakusafw/asakusafw

assert flow != null;
assert executionId != null;
YSLOG.info("I02000", batchId, flow.getId(), executionId);
long start = System.currentTimeMillis();
try {
  if (skipFlows.contains(flow.getId())) {
    YSLOG.info("I02002", batchId, flow.getId(), executionId);
    return;
      executePhase(batchId, flow, executionId, ExecutionPhase.FINALIZE);
    } else {
      YSLOG.info("I02003", batchId, flow.getId(), executionId);
      try {
        executePhase(batchId, flow, executionId, ExecutionPhase.FINALIZE);
      } catch (Exception e) {
        YSLOG.warn(e, "W02002", batchId, flow.getId(), executionId);
    executePhase(batchId, flow, executionId, ExecutionPhase.CLEANUP);
  } catch (Exception e) {
    YSLOG.warn(e, "W02003", batchId, flow.getId(), executionId);
  YSLOG.info("I02001", batchId, flow.getId(), executionId);
} catch (ExitCodeException e) {
  YSLOG.error("E02001", batchId, flow.getId(), executionId);
  throw e;
} catch (IOException e) {
  YSLOG.error(e, "E02001", batchId, flow.getId(), executionId);
  throw e;
} catch (InterruptedException e) {

代码示例来源:origin: asakusafw/asakusafw

private File getConfDirectory(ServiceProfile<?> profile) {
  assert profile != null;
  String value = profile.getConfiguration(KEY_DIRECTORY, true, true);
  File dir = new File(value);
  if (dir.exists() == false) {
    YSLOG.info("I00001",
        profile.getPrefix(),
        KEY_DIRECTORY,
        value);
  }
  return dir;
}

代码示例来源:origin: asakusafw/asakusafw

private void submitScript(ExecutionContext context, JobInfo info) throws IOException, InterruptedException {
  assert context != null;
  assert info != null;
  YSLOG.info("I01003",
      info.script.getBatchId(),
      info.script.getFlowId(),
    info.client.submit(info.id);
  } catch (IOException e) {
    YSLOG.error(e, "E01002",
        info.script.getBatchId(),
        info.script.getFlowId(),
  YSLOG.info("I01004",
      info.script.getBatchId(),
      info.script.getFlowId(),

代码示例来源:origin: asakusafw/asakusafw

private static void close(InputStream c) {
  try {
    c.close();
  } catch (IOException e) {
    YSLOG.warn(e, "W99004");
  }
}

代码示例来源:origin: asakusafw/asakusafw

private Properties loadBatchConf(ExecutionContext context, ExecutionScript script) throws IOException {
  assert context != null;
  String fileName = context.getBatchId() + SUFFIX_CONF;
  File file = new File(confDirectory, fileName);
  LOG.debug("Finding multidispatch configuration file: batchId={}, file={}", context.getBatchId(), file);
  if (file.isFile() == false) {
    LOG.debug("Missing multidispatch configuration file: batchId={}, file={}", context.getBatchId(), file);
    return null;
  }
  LOG.debug("Loading multidispatch configuration file: batchId={}, file={}", context.getBatchId(), file);
  try (InputStream in = new FileInputStream(file)) {
    Properties properties = new Properties();
    properties.load(in);
    return properties;
  } catch (IOException e) {
    YSLOG.error(e, "E01001",
        context.getBatchId(),
        file.getAbsolutePath());
    throw e;
  }
}

代码示例来源:origin: asakusafw/asakusafw

/**
 * Log a message at ERROR level.
 * @param code the message code
 * @param arguments the arguments
 * @throws IllegalArgumentException if some parameters were {@code null}
 */
public void error(String code, Object... arguments) {
  if (internal.isErrorEnabled()) {
    String message = message(code, arguments);
    internal.error(message);
  }
}

代码示例来源:origin: asakusafw/asakusafw

assert context != null;
assert executions != null;
YSLOG.info("I03000",
    context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase());
long start = System.currentTimeMillis();
try {
  if (skipFlows.contains(context.getFlowId())) {
    YSLOG.info("I03002",
        context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase());
    return;
  YSLOG.info("I03001",
      context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase());
} catch (ExitCodeException e) {
  YSLOG.error("E03001",
      context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase());
  throw e;
} catch (IOException e) {
  YSLOG.error(e, "E03001",
      context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase());
  throw e;
} catch (InterruptedException e) {
  YSLOG.warn(e, "W03001",
      context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase());
  throw e;
} finally {
  long end = System.currentTimeMillis();
  YSLOG.info("I03999",
      context.getBatchId(), context.getFlowId(), context.getExecutionId(), context.getPhase(),

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com