Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
files read/written
#2
My dev plugin outputs some stuff as well, such as includes, peak memory, etc.

To log files written there are 2 options I can think of.

We allow plugins to write their own data, we could prevent this and force the use of an internal class for writing files, which could have a hook or logging mechanism.

A file storage class is already something we need anyway, its too much work for plugin authors to have to create a mechanism for saving and retrieving custom settings when we could build it in.

OR

You could check all writable file mod stamps, and compare them to an execution start and end timestamp of the script.

This is the best option for a plugin. I could even add this to my dev suite plugin.

Of course there are probably all kinds of OS level stuff you could do also.

There is a third option for controlled installs using pecl APD and php function_override to replace the typical file saving functions with your own.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
files read/written - by Carlos - 2012-04-30, 07:36:47
files read/written - by shawn_a - 2012-04-30, 23:53:28
files read/written - by Carlos - 2012-05-04, 06:21:37
files read/written - by shawn_a - 2012-05-04, 12:00:05



Users browsing this thread: 1 Guest(s)