My Log It

To help defray the cost of development, feel free to donate a small amount. $10 is normal.

[wpdm_package id=’1946′]

My Logit

Plugin “my-logit” logs data from plugins that make a function call to ‘logit’ which has been added in their plugin code. The call takes  three arguments “logit(1,__LINE__, “some data”). This is a great plugin for logging and testing as it progresses through your plugin.

In ‘my-logit’ you can create up to four log files, view them, print them, and clear them. You can name the file anything you want. the log files are kept in the folder http://your-domain/contents/uploads.  “.log” is appended to the filename so do you do not need to append .log yourself.

To Use
Place the code “logit(File Number, __LINE__, “Data”) anywhere in  your plugin code where you want to log data.

Arguments are:
– File Number (1-4), number representing which log file to use.
– __LINE__  will log the plugin line number.  __FILE__ would log the plugin file name (This can be any text or blank) . Supports HTML structure.
– Data is the data to be logged.

To View, Clear, Delete, Print, or Test Log File, first select the appropriate File # and the click Save Settings.

Examples
logit(1,__LINE__, “some data”);
logit(2,__LINE__, $myVariable);
logit(3,__FILE__, “my data: $myVariable”);
logit(4,””,”<h3>Log File: $logfile</h3>”);

Known Issues

Be careful on clearing and deleting files as this plugin currently does not ask for confirmation (coming).

To Setup
Enter the name for the logfile(s) (up to four). Click on Enable to turn on the logging for this file. Click on Show Time to include the date and time in the log file when  logging.

Screenshot

Screenshot

Installation

  1. Upload `my-logit.php` to the `/wp-content/plugins/` directory.
  2. Activate the plugins through the ‘Plugins’ menu in WordPress

After activation, link to “my-logit” will be found in the Tools menu in the dashboard.

Donation

Comments are closed.