Skip to main content
changed title to make it more specific to the question
Link

Where should an Is it a bad idea to write audit trail / transactionaccess/transaction log be storedinformation directly to the filesystem?

it's irrelevant that I might remove the file later; removed that comment
Source Link

In addition to some custom post types, my application has two custom tables in the WP database. I'd like to keep a record of all inserts/updates/deletes to these two tables.

This audit trail won't be front-ended, and it won't be used often. I'd like it in place for my own diagnostic purposes. Once the application is stable, I might remove it. The application will be installed at 5-10 sites, and I expect to see fewer than 10,000 of these actions per year at each site.

I'm considering these options:

  1. a custom post type (with no post meta)
  2. a custom table in the WP database
  3. a simple append-only file in the filesystem

Option 3 seems simplest, and it avoids gunking up the WP DB with this non-critical data. But writing data directly to the filesystem seems wrong somehow, and it doesn't seem to be a common approach.

Are there strong reasons to choose options 1 or 2 instead of writing to the filesystem?

In addition to some custom post types, my application has two custom tables in the WP database. I'd like to keep a record of all inserts/updates/deletes to these two tables.

This audit trail won't be front-ended, and it won't be used often. I'd like it in place for my own diagnostic purposes. Once the application is stable, I might remove it. The application will be installed at 5-10 sites, and I expect to see fewer than 10,000 of these actions per year at each site.

I'm considering these options:

  1. a custom post type (with no post meta)
  2. a custom table in the WP database
  3. a simple append-only file in the filesystem

Option 3 seems simplest, and it avoids gunking up the WP DB with this non-critical data. But writing data directly to the filesystem seems wrong somehow, and it doesn't seem to be a common approach.

Are there strong reasons to choose options 1 or 2 instead of writing to the filesystem?

In addition to some custom post types, my application has two custom tables in the WP database. I'd like to keep a record of all inserts/updates/deletes to these two tables.

This audit trail won't be front-ended, and it won't be used often. I'd like it in place for my own diagnostic purposes. The application will be installed at 5-10 sites, and I expect to see fewer than 10,000 of these actions per year at each site.

I'm considering these options:

  1. a custom post type (with no post meta)
  2. a custom table in the WP database
  3. a simple append-only file in the filesystem

Option 3 seems simplest, and it avoids gunking up the WP DB with this non-critical data. But writing data directly to the filesystem seems wrong somehow, and it doesn't seem to be a common approach.

Are there strong reasons to choose options 1 or 2 instead of writing to the filesystem?

Source Link

Where should an audit trail / transaction log be stored?

In addition to some custom post types, my application has two custom tables in the WP database. I'd like to keep a record of all inserts/updates/deletes to these two tables.

This audit trail won't be front-ended, and it won't be used often. I'd like it in place for my own diagnostic purposes. Once the application is stable, I might remove it. The application will be installed at 5-10 sites, and I expect to see fewer than 10,000 of these actions per year at each site.

I'm considering these options:

  1. a custom post type (with no post meta)
  2. a custom table in the WP database
  3. a simple append-only file in the filesystem

Option 3 seems simplest, and it avoids gunking up the WP DB with this non-critical data. But writing data directly to the filesystem seems wrong somehow, and it doesn't seem to be a common approach.

Are there strong reasons to choose options 1 or 2 instead of writing to the filesystem?