summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-04-17 11:23:22 -0700
committerIvan Kohler <ivan@freeside.biz>2018-04-17 11:23:22 -0700
commit69c7d00baa39ccc2fbee0f12d03f49403f04c3cf (patch)
tree72ce6c834d794ad85974faaf26f3202a5f74e160
parentb3ecc63dba7b5739467c342a8f861a94b9b1ee29 (diff)
log pid in our log, RT#80211
-rw-r--r--FS/FS/Schema.pm1
-rw-r--r--FS/FS/access_user_log.pm6
2 files changed, 7 insertions, 0 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 5b33ecba9..e2c575eb5 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -5968,6 +5968,7 @@ sub tables_hashref {
'path', 'varchar', '', 2*$char_d, '', '',
'_date', @date_type, '', '',
'render_seconds', 'int', 'NULL', '', '', '',
+ 'pid', 'int', 'NULL', '', '', '',
],
'primary_key' => 'lognum',
'unique' => [],
diff --git a/FS/FS/access_user_log.pm b/FS/FS/access_user_log.pm
index 026670caf..552dd2ad8 100644
--- a/FS/FS/access_user_log.pm
+++ b/FS/FS/access_user_log.pm
@@ -53,6 +53,10 @@ _date
=back
+=item pid
+
+=back
+
=head1 METHODS
=over 4
@@ -84,6 +88,7 @@ sub insert_new_path {
'path' => $path,
'_date' => time,
'render_seconds' => $render_seconds,
+ 'pid' => $$,
} );
#so we can still log pages after a transaction-aborting SQL error (and then
@@ -127,6 +132,7 @@ sub check {
|| $self->ut_text('path')
|| $self->ut_number('_date')
|| $self->ut_numbern('render_seconds')
+ || $self->ut_numbern('pid')
;
return $error if $error;