-
Notifications
You must be signed in to change notification settings - Fork 448
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
Scheduled task cannot open log file #9979
Comments
@asmecher, what do you think about using the class name for the scheduled tasks log file names instead of translated scheduled task name, s. https://github.com/pkp/pkp-lib/blob/stable-3_4_0/classes/scheduledTask/ScheduledTask.php#L55 ? |
The The filename is |
@bozana I was also going to propose changing this 😁
|
Thanks a lot! |
@jonasraoni, could you please review the PR above? Do you think I should also change it for stable_3_3_0? |
I consider it as a bug, so I think it's ok to modify the |
#9979 use class name for scheduled task log file name
pkp/pkp-lib#9979 submodule update ##bozana/9979##
pkp/pkp-lib#9979 submodule update ##bozana/9979##
pkp/pkp-lib#9979 submodule update ##bozana/9979##
#9979 use class name for scheduled task log file name
pkp/pkp-lib#9979 submodule update ##bozana/9979-3_3_0##
pkp/pkp-lib#9979 submodule update ##bozana/9979-3_3_0##
pkp/pkp-lib#9979 submodule update ##bozana/9979-3_3_0##
Ah, as we're using just the last part of the class name, one possible problem that might happen in the future (for the applications that use namespace) is a name collision (e.g. Perhaps it's not needed to fix, depending on how the #9678 is being implemented. |
@jonasraoni as we add prefix the class name with a unique process id using Also the last part only use |
Yep, that's what I've inferred and what I'm worried about, to have a meaningful name for a sysadmin. Using the full class name doesn't make up for a beautiful name, but it's better. Instead of including the time, I'd rather have a single log file for the task (every entry on the file already has a timestamp). It should simplify the implementation of a log rotation by end users and decrease the filesystem pollution. I'll ask internally if the hosting team agrees and/or has extra considerations. @asmecher / @bozana If you agree with the above, I'll create a side-task. |
Hi @jonasraoni, I agree. |
Yep, that's how it works, once it gets too large, the old content is archived. |
@jonasraoni is that is the path we plan to take on (which is better), perhaps we can consider #7966 ? However it will be some good amount of work . |
Hi, On a new installation of latest stable release of OJS, I keep getting this error on each page load: Was this not fixed already / how can I avoid filling my error with this? edit: Nevermind! This type of error can also be caused if the write permissions in files folder are not set correctly. Sorry for alerting you! |
Describe the bug
The scheduled task for
mailable.editorialReminder
fails to open its logfile when using the german locale.It uses the translation as a log file name (
EineautomatisierteE-Mail,dieanRedakteur/innenmitaussstehendenAufgabengeschicktwird-664961d155097-20240519.log
) which cannot be created since it contains a/
.Proposed Solution
Remove or escape all special characters in the file name.
What application are you using?
OMP version 3.4.0-5
Additional information
stacktrace:
PRs:
stable-3_3_0:
stable-3_4_0:
main:
The text was updated successfully, but these errors were encountered: