|
|
|
The Time Format for File names can be changed with the Following Functions
|
|
|
|
|
|
|
|
<h3>setFileNameDateTimeFormat<h3>
|
|
|
|
|
|
|
|
This Function takes a DateTimeFormatter
|
|
|
|
```java
|
|
|
|
.setTimeFormat(DateTimeFormatter);
|
|
|
|
```
|
|
|
|
You can create a DateTimeFormatter by giving it a Pattern [Oracle Examples](https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html) Goto the Paragraph 'Patterns for Formatting and Parsing'
|
|
|
|
An example of achieving a Pattern would be:
|
|
|
|
```java
|
|
|
|
DateTimeFormatter.ofPattern("dd-MM-yyyy_HH_mm_ss");
|
|
|
|
```
|
|
|
|
This would out put Day-Month-Year-Hour-Minute-Second.
|
|
|
|
|
|
|
|
<h3>useDefaultFileNameFormat</h3>
|
|
|
|
|
|
|
|
This will apply the Default DateTimeFormatter:
|
|
|
|
```java
|
|
|
|
.useDefaultFileNameFormat();
|
|
|
|
```
|
|
|
|
|
|
|
|
Which is
|
|
|
|
```java
|
|
|
|
"dd-MM-yyyy_HH_mm_ss"
|
|
|
|
```
|
|
|
|
|
|
|
|
<h3>setCustomFileName</h3>
|
|
|
|
|
|
|
|
This will take the given name and write the Logs to it
|
|
|
|
```java
|
|
|
|
.setCustomFileName(String)
|
|
|
|
```
|
|
|
|
<b>Example: %CUSTOM_NAME%.log</b> |
|
|
|
\ No newline at end of file |