Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom date format for logging with datetime in filename #6136

Closed
2 tasks done
xsolinsx opened this issue Oct 14, 2023 · 0 comments · Fixed by #6333
Closed
2 tasks done

custom date format for logging with datetime in filename #6136

xsolinsx opened this issue Oct 14, 2023 · 0 comments · Fixed by #6333
Labels
priority/4/normal Normal priority items status/ready Is ready to try/merge type/feature Request for adding a new feature

Comments

@xsolinsx
Copy link

xsolinsx commented Oct 14, 2023

Description

Building on #3210 and #3330, I would like to specify a custom format for datetime in the configuration

I am asking this because the american format is not ideal to me, I prefer having something that follows a logical order of year-month-day hour:minute:second

Use Case

having a specifiable format inside the configuration would allow authelia to write to the same log file if the format allows it
i.e.
let's say that the option is called "datetime_format" and is set as "year-month-day" (sorry, I don't know the Go syntax for datetimes)
in this case, if I restart authelia multiple times during the day to debug something, I would have a single log file for the whole day instead of multiple log files separated by few minutes
having it set as "year-month" would allow for at most 12 log files each year no matter how many restarts authelia goes through

Details

the side effect that may arise is that setting it to "minute" would probably mess up the purpose of logging, but I think that's an issue of the user that has specified it like that

Documentation

No response

Pre-Submission Checklist

  • I agree to follow the Code of Conduct

  • I have checked for related issues and checked the documentation

@xsolinsx xsolinsx added priority/4/normal Normal priority items status/needs-design Requires thoughtful design type/feature Request for adding a new feature labels Oct 14, 2023
@james-d-elliott james-d-elliott added status/ready Is ready to try/merge and removed status/needs-design Requires thoughtful design labels Nov 26, 2023
james-d-elliott added a commit that referenced this issue Nov 26, 2023
This adds a date time layout option for the log file path.

Closes #6136
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/4/normal Normal priority items status/ready Is ready to try/merge type/feature Request for adding a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants