Package fr.ens.biologie.genomique.aozan
Class Common
- java.lang.Object
-
- fr.ens.biologie.genomique.aozan.Common
-
public class Common extends Object
This class contains common methods like logger initialization.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description Common()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cancelLogger()
Cancel logger.static int
getCurrentPid()
Return the pid of the instance of jvm.static void
initLogger(String logPath)
Initialize the logger for the application.static void
initLogger(String logPath, String logLevel)
Initialize the logger for the application.static void
initLogger(String logPath, Level logLevel)
Initialize the logger for the application.
-
-
-
Method Detail
-
getCurrentPid
public static final int getCurrentPid()
Return the pid of the instance of jvm.- Returns:
- pid of the instance of jvm, or null
-
initLogger
public static void initLogger(String logPath) throws SecurityException, IOException, AozanException
Initialize the logger for the application.- Parameters:
logPath
- path of the log file- Throws:
SecurityException
- if an error occurs while initializing the loggerIOException
- if cannot open/create the log fileAozanException
-
initLogger
public static void initLogger(String logPath, String logLevel) throws SecurityException, IOException, AozanException
Initialize the logger for the application.- Parameters:
logPath
- path of the log filelogLevel
- log level- Throws:
SecurityException
- if an error occurs while initializing the loggerIOException
- if cannot open/create the log fileAozanException
-
initLogger
public static void initLogger(String logPath, Level logLevel) throws SecurityException, IOException, AozanException
Initialize the logger for the application.- Parameters:
logPath
- path of the log filelogLevel
- log level- Throws:
SecurityException
- if an error occurs while initializing the loggerIOException
- if cannot open/create the log fileAozanException
-
cancelLogger
public static void cancelLogger()
Cancel logger.
-
-