Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L LogThem
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Joseph Perthold
  • LogThem
  • Wiki
  • File DateTimeFormat

File DateTimeFormat · Changes

Page history
Create File DateTimeFormat authored Aug 14, 2024 by Joseph Perthold's avatar Joseph Perthold
Show whitespace changes
Inline Side-by-side
File-DateTimeFormat.md 0 → 100644
View page @ 73e97eee
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
Clone repository

Home
Location
Log Format
Log DateTimeFormat
File DateTimeFormat