-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0656a6
commit 1a87b08
Showing
5 changed files
with
64 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Changelog 1.1 (20-05-2020) | ||
---------------------------- | ||
* Added single_pattern in properties | ||
* Added support custom pattern for initialization before tests. log("[%p] %d{HH:mm:ss} custom - %m%n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package logger; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.Properties; | ||
import java.util.logging.Logger; | ||
|
||
public class Props { | ||
|
||
public static final Logger LOGGER = Logger.getLogger(Props.class.getName()); | ||
|
||
public final static Properties properties; | ||
|
||
static { | ||
properties = loadProperties(); | ||
} | ||
|
||
public static Properties loadProperties() { | ||
String propertiesFileName = "parallel_log.properties"; | ||
|
||
Properties mainProperties = new Properties(); | ||
try (InputStream input = LoggerFactory.class.getClassLoader().getResourceAsStream(propertiesFileName)) { | ||
|
||
if (input != null) { | ||
mainProperties.load(input); | ||
} else { | ||
LOGGER.info("Sorry, unable to find " + propertiesFileName); | ||
} | ||
|
||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
return mainProperties; | ||
} | ||
|
||
} |