Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1171683
D542.id1406.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Sep 28, 10:37 AM
Size
3 KB
Mime Type
text/x-diff
Expires
Mon, Sep 29, 10:37 AM (12 h, 40 m)
Engine
blob
Format
Raw Data
Handle
759242
Attached To
D542: INP-1926 - Display "Hostname" and "Server Hostname" in the Session Log
D542.id1406.diff
View Options
Index: branches/5.2.x/core/install/install_schema.sql
===================================================================
--- branches/5.2.x/core/install/install_schema.sql
+++ branches/5.2.x/core/install/install_schema.sql
@@ -706,6 +706,8 @@
SessionEnd int(11) DEFAULT NULL,
IP varchar(50) NOT NULL DEFAULT '',
AffectedItems int(11) NOT NULL DEFAULT '0',
+ Hostname varchar(255) NOT NULL DEFAULT '',
+ ServerHostname varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (SessionLogId),
KEY SessionId (SessionId),
KEY `Status` (`Status`),
Index: branches/5.2.x/core/install/upgrades.sql
===================================================================
--- branches/5.2.x/core/install/upgrades.sql
+++ branches/5.2.x/core/install/upgrades.sql
@@ -3011,3 +3011,7 @@
ALTER TABLE SystemLog ADD INDEX `TIMESTAMP_REQUEST_DATA_ROTATED` (`LogTimestamp`,`LogRequestDataRotated`) USING BTREE;
ALTER TABLE SystemLog ADD LogServerHostname varchar(255) NOT NULL DEFAULT '' AFTER LogHostname;
+
+ALTER TABLE UserSessionLogs
+ ADD COLUMN `Hostname` varchar(255) NOT NULL DEFAULT '',
+ ADD COLUMN `ServerHostname` varchar(255) NOT NULL DEFAULT '';
Index: branches/5.2.x/core/units/logs/session_logs/session_log_eh.php
===================================================================
--- branches/5.2.x/core/units/logs/session_logs/session_log_eh.php
+++ branches/5.2.x/core/units/logs/session_logs/session_log_eh.php
@@ -40,6 +40,8 @@
'SessionId' => $this->Application->GetSID(Session::PURPOSE_REFERENCE),
'SessionKey' => $this->Application->GetSID(Session::PURPOSE_STORAGE),
'Status' => SESSION_LOG_ACTIVE,
+ 'Hostname' => $_SERVER['HTTP_HOST'],
+ 'ServerHostname' => gethostname(),
);
$object->SetDBFieldsFromHash($fields_hash);
Index: branches/5.2.x/core/units/logs/session_logs/session_logs_config.php
===================================================================
--- branches/5.2.x/core/units/logs/session_logs/session_logs_config.php
+++ branches/5.2.x/core/units/logs/session_logs/session_logs_config.php
@@ -122,6 +122,8 @@
'SessionEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
'IP' => Array ('type' => 'string', 'max_len' => 50, 'not_null' => 1, 'default' => ''),
'AffectedItems' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
+ 'Hostname' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'ServerHostname' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
),
'VirtualFields' => Array (
@@ -149,6 +151,8 @@
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
'IP' => Array ('title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'AffectedItems' => Array ('title' => 'la_col_AffectedItems', 'data_block' => 'affected_td', 'filter_block' => 'grid_range_filter', 'width' => 120, ),
+ 'Hostname' => Array ('title' => 'column:la_fld_LogHostname', 'filter_block' => 'grid_like_filter'),
+ 'ServerHostname' => Array ('title' => 'column:la_fld_LogServerHostname', 'filter_block' => 'grid_like_filter'),
),
),
),
Event Timeline
Log In to Comment