Will implement Add additional directories
- Alex Chartier
-
Topic Author
- Offline
Less
More
- Posts: 56
- Thank you received: 0
8 months 1 week ago #2995
by Alex Chartier
Add additional directories was created by Alex Chartier
Would be valuable if I could add additional directories to search for log files. Not all extensions store them in administrator/logs.
Not critical but a nice to have.
Not critical but a nice to have.
Please Log in to join the conversation.
- Ruud van Lent
-
- Offline
Less
More
- Posts: 1698
- Thank you received: 110
8 months 1 week ago #2998
by Ruud van Lent
Replied by Ruud van Lent on topic Add additional directories
Hi Alex,
That is doable. Will put it on the todo-feature list.
Thanks,
Ruud
That is doable. Will put it on the todo-feature list.
Thanks,
Ruud
Please Log in to join the conversation.
- Ruud van Lent
-
- Offline
Less
More
- Posts: 1698
- Thank you received: 110
8 months 6 days ago #3004
by Ruud van Lent
Replied by Ruud van Lent on topic Add additional directories
Hi Alex,
so just had a go on this.
in the version linked above (2.1.0.DEV) you can now configure an extra directory. Files that match the regex in that directory will be prepended with a '+' to avoid confusion when the main directory and the extra directory have files that have the same filename.
Can you test this?
I have it currently installed on my production site, no issues so far (wasn't expecting any
)
regards,
Ruud.
so just had a go on this.
in the version linked above (2.1.0.DEV) you can now configure an extra directory. Files that match the regex in that directory will be prepended with a '+' to avoid confusion when the main directory and the extra directory have files that have the same filename.
Can you test this?
I have it currently installed on my production site, no issues so far (wasn't expecting any

regards,
Ruud.
Please Log in to join the conversation.
- Alex Chartier
-
Topic Author
- Offline
Less
More
- Posts: 56
- Thank you received: 0
8 months 6 days ago #3005
by Alex Chartier
Replied by Alex Chartier on topic Add additional directories
The directory listing is unwieldy, is there any way to set it up as a tree that can be selected and drilled down? Also, it appears it is only accepting files ending in php versus files that end in .log.
And it would be nice to be able to add multiple extra directories.
All nice to have though.
And it would be nice to be able to add multiple extra directories.
All nice to have though.
Please Log in to join the conversation.
- Ruud van Lent
-
- Offline
Less
More
- Posts: 1698
- Thank you received: 110
8 months 6 days ago #3006
by Ruud van Lent
Replied by Ruud van Lent on topic Add additional directories
Hi Alex,
the purpose of ochLogFiles is to have a simple means to view logfiles created by extensions (that implement the Joomla core provided log functionality).
These files are stored in the directory set in the Joomla Global config.
These logfiles always have a .php extension: this is for a reason: security!
By implementing log functionality via the Joomla framework you get a lot of perks out of the box (e.g. different log levels, log rotation, integration with the Joomla debugger, etc.) but beside that the code for logging is maintained and secure!
That said: when an extension implements its own log functionality and stores the log in a different directory with a different file extension then this change I made in the new version is able to display the contents of that directory as well.
Behold: ochLogFiles is not a file manager extension (with a tree that can be drilled down), this is beyond what it is for. there are extensions that will do just that (but be careful with extensions like that as they when not implemented correct can pose a security risk).
By default ochlogFiles is configured to display only .php files in a directory, this is a configuration setting and you can change that to also display .log files. just change the configuration setting (Parameters tab) 'Files Regex' to:
This is the setting I currently have: it only displays the current log files, not the rotated (starting with a number):
the purpose of ochLogFiles is to have a simple means to view logfiles created by extensions (that implement the Joomla core provided log functionality).
These files are stored in the directory set in the Joomla Global config.
These logfiles always have a .php extension: this is for a reason: security!
By implementing log functionality via the Joomla framework you get a lot of perks out of the box (e.g. different log levels, log rotation, integration with the Joomla debugger, etc.) but beside that the code for logging is maintained and secure!
That said: when an extension implements its own log functionality and stores the log in a different directory with a different file extension then this change I made in the new version is able to display the contents of that directory as well.
Behold: ochLogFiles is not a file manager extension (with a tree that can be drilled down), this is beyond what it is for. there are extensions that will do just that (but be careful with extensions like that as they when not implemented correct can pose a security risk).
By default ochlogFiles is configured to display only .php files in a directory, this is a configuration setting and you can change that to also display .log files. just change the configuration setting (Parameters tab) 'Files Regex' to:
Code:
[\.php|\.log]$
Code:
^([a-z|A-Z]).+?[\.php|\.log]$
Please Log in to join the conversation.
- Alex Chartier
-
Topic Author
- Offline
Less
More
- Posts: 56
- Thank you received: 0
8 months 5 days ago #3007
by Alex Chartier
Replied by Alex Chartier on topic Add additional directories
I'm OK with it. Don't spend any more time on it. It was simply a suggestion. I can live with it the way it is/was.
Thanks for your work on it though. Great support!
Thanks for your work on it though. Great support!
Please Log in to join the conversation.
- Ruud van Lent
-
- Offline
Less
More
- Posts: 1698
- Thank you received: 110
8 months 5 days ago #3010
by Ruud van Lent
Replied by Ruud van Lent on topic Add additional directories
Thanks,
Will run some more tests.and release new version
Thanks for the request and testing 👍
Will run some more tests.and release new version
Thanks for the request and testing 👍
Please Log in to join the conversation.