Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1167377
D542.id1404.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
Tue, Sep 23, 11:08 AM
Size
3 KB
Mime Type
text/x-diff
Expires
Wed, Sep 24, 11:08 AM (12 h, 30 m)
Engine
blob
Format
Raw Data
Handle
756152
Attached To
D542: INP-1926 - Display "Hostname" and "Server Hostname" in the Session Log
D542.id1404.diff
View Options
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql
+++ 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: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql
+++ core/install/upgrades.sql
@@ -3010,4 +3010,8 @@
ALTER TABLE SystemLog ADD COLUMN `LogRequestDataRotated` tinyint NOT NULL DEFAULT '0' AFTER `LogRequestData`;
ALTER TABLE SystemLog ADD INDEX `TIMESTAMP_REQUEST_DATA_ROTATED` (`LogTimestamp`,`LogRequestDataRotated`) USING BTREE;
+ALTER TABLE UserSessionLogs
+ ADD COLUMN `Hostname` varchar(255) NOT NULL DEFAULT '',
+ ADD COLUMN `ServerHostname` varchar(255) NOT NULL DEFAULT '';
+
ALTER TABLE SystemLog ADD LogServerHostname varchar(255) NOT NULL DEFAULT '' AFTER LogHostname;
Index: core/units/logs/session_logs/session_log_eh.php
===================================================================
--- core/units/logs/session_logs/session_log_eh.php
+++ 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: core/units/logs/session_logs/session_logs_config.php
===================================================================
--- core/units/logs/session_logs/session_logs_config.php
+++ 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_ServerHostname', 'filter_block' => 'grid_like_filter'),
),
),
),
Event Timeline
Log In to Comment