congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FileLogManager.resolveDirsIfNeeded
Code IndexAdd Tabnine to your IDE (free)

How to use
resolveDirsIfNeeded
method
in
com.norconex.jef4.log.FileLogManager

Best Java code snippets using com.norconex.jef4.log.FileLogManager.resolveDirsIfNeeded (Showing top 3 results out of 315)

origin: com.norconex.jef/norconex-jef

/**
 * Gets the log file used by this log manager.
 * @param suiteId log file suiteId
 * @return log file
 */
public File getLogFile(final String suiteId) {
  if (suiteId == null) {
    return null;
  }
  resolveDirsIfNeeded();
  return new File(logdirLatest + "/" 
      + FileUtil.toSafeFileName(suiteId) + LOG_SUFFIX);
}
 
origin: com.norconex.jef/norconex-jef

@Override
public final Appender createAppender(final String suiteId)
    throws IOException {
  resolveDirsIfNeeded();
  return new FileAppender(new PatternLayout(LAYOUT_PATTERN),
      logdirLatest + "/" + 
          FileUtil.toSafeFileName(suiteId) + LOG_SUFFIX);
}
 
origin: com.norconex.jef/norconex-jef

@Override
public final void backup(final String suiteId, final Date backupDate)
    throws IOException {
  resolveDirsIfNeeded();
  String date = new SimpleDateFormat(
      "yyyyMMddHHmmssSSSS").format(backupDate);
  File progressFile = getLogFile(suiteId);
  
  File backupDir = FileUtil.createDateDirs(
      new File(logdirBackupBase), backupDate);
  backupDir = new File(backupDir, "logs");
  if (!backupDir.exists()) {
    try {
      FileUtils.forceMkdir(backupDir);
    } catch (IOException e) {
      throw new JEFException("Cannot create backup directory: "
          + backupDir, e);
    }
  }        
  File backupFile = new File(
      backupDir + "/" + date + "__" 
          + FileUtil.toSafeFileName(suiteId) + LOG_SUFFIX);
  if (progressFile.exists()) {
    FileUtil.moveFile(progressFile, backupFile);
  }
}
com.norconex.jef4.logFileLogManagerresolveDirsIfNeeded

Popular methods of FileLogManager

  • <init>
    Creates a new FileLogManager, wrapping the given layout into a ThreadSafeLayout.
  • getLog
  • getLogFile
    Gets the log file used by this log manager.
  • setLogDirectory

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • startActivity (Activity)
  • putExtra (Intent)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JOptionPane (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now