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

Update cron.php #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update cron.php #12

wants to merge 1 commit into from

Conversation

slavino
Copy link
Contributor

@slavino slavino commented Jan 19, 2022

adding date to cron.log -> cron_2022_01_19.log

adding date to cron.log -> cron_2022_01_19.log
@adaniello
Copy link

That way you would have n log files for n cron tasks. Only one log file with a good rotation policy is better

@slavino
Copy link
Contributor Author

slavino commented Jan 19, 2022

That way you would have n log files for n cron tasks. Only one log file with a good rotation policy is better

Only one file per day to my understanding of the proposed change. The log rotation is then extensible to compressing older files and also deleting very old files based on user's wish.

@adaniello
Copy link

Why not move the (optional) suffix in conf?

@slavino
Copy link
Contributor Author

slavino commented Jan 19, 2022

Why not move the (optional) suffix in conf?

Reflecting current implementation that would mean something like introducing new config option
logFilename=dirname/cron_{{@(date'Y_m_d')}}.log

[CRON]
log = TRUE
logFilename=cronLogs/cron_{{ @(date'Y_m_d') }}.log

which would put your cron logs into F3 logs directory and it's subdir "cronLogs" and rolling once per day?

@adaniello
Copy link

@slavino I like that the user can be free to choose

@slavino
Copy link
Contributor Author

slavino commented Jan 20, 2022

Well then - the last proposal is 100% backward compatible and enables choice of time based rolling frequency via filename changes.
What is the next step @xfra35 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants