Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1169161
D539.id1403.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
Thu, Sep 25, 9:04 PM
Size
7 KB
Mime Type
text/x-diff
Expires
Fri, Sep 26, 9:04 PM (11 h, 14 m)
Engine
blob
Format
Raw Data
Handle
757491
Attached To
D539: INP-1923 - Display "Server Hostname" in the System Log
D539.id1403.diff
View Options
Index: branches/5.2.x/admin/system_presets/simple/system_logs_system-log.php
===================================================================
--- branches/5.2.x/admin/system_presets/simple/system_logs_system-log.php
+++ branches/5.2.x/admin/system_presets/simple/system_logs_system-log.php
@@ -20,9 +20,10 @@
// fields to hide
$hidden_fields = Array (
/*'LogId', 'LogUniqueId', 'LogLevel', 'LogType', 'LogCode', 'LogMessage', 'LogTimestamp', 'LogDate',
- 'LogEventName', 'LogHostname', 'LogRequestSource', 'LogRequestURI', 'LogRequestData', 'LogUserId',
- 'LogInterface', 'IpAddress', 'LogSessionKey', 'LogSessionData', 'LogBacktrace', 'LogSourceFilename',
- 'LogSourceFileLine', 'LogProcessId', 'LogMemoryUsed', 'LogUserData', 'LogNotificationStatus',*/
+ 'LogEventName', 'LogHostname', 'LogServerHostname', 'LogRequestSource', 'LogRequestURI', 'LogRequestData',
+ 'LogUserId', 'LogInterface', 'IpAddress', 'LogSessionKey', 'LogSessionData', 'LogBacktrace',
+ 'LogSourceFilename', 'LogSourceFileLine', 'LogProcessId', 'LogMemoryUsed', 'LogUserData',
+ 'LogNotificationStatus',*/
);
// virtual fields to hide
@@ -33,9 +34,10 @@
// fields to make required
$required_fields = Array (
/*'LogId', 'LogUniqueId', 'LogLevel', 'LogType', 'LogCode', 'LogMessage', 'LogTimestamp', 'LogDate',
- 'LogEventName', 'LogHostname', 'LogRequestSource', 'LogRequestURI', 'LogRequestData', 'LogUserId',
- 'LogInterface', 'IpAddress', 'LogSessionKey', 'LogSessionData', 'LogBacktrace', 'LogSourceFilename',
- 'LogSourceFileLine', 'LogProcessId', 'LogMemoryUsed', 'LogUserData', 'LogNotificationStatus',*/
+ 'LogEventName', 'LogHostname', LogServerHostname, 'LogRequestSource', 'LogRequestURI', 'LogRequestData',
+ 'LogUserId', 'LogInterface', 'IpAddress', 'LogSessionKey', 'LogSessionData', 'LogBacktrace',
+ 'LogSourceFilename', 'LogSourceFileLine', 'LogProcessId', 'LogMemoryUsed', 'LogUserData',
+ 'LogNotificationStatus',*/
);
// virtual fields to make required
@@ -47,8 +49,8 @@
$hide_columns = Array (
/*'Default' => Array (
'LogId', 'LogLevel', 'LogType', 'LogCode', 'LogMessage', 'LogTimestamp', 'LogEventName', 'LogHostname',
- 'LogRequestSource', 'LogRequestURI', 'Username', 'LogInterface', 'IpAddress', 'LogSessionKey',
- 'LogSourceFilename', 'LogSourceFileLine', 'LogProcessId', 'LogMemoryUsed', 'LogUserData',
+ 'LogServerHostname', 'LogRequestSource', 'LogRequestURI', 'Username', 'LogInterface', 'IpAddress',
+ 'LogSessionKey', 'LogSourceFilename', 'LogSourceFileLine', 'LogProcessId', 'LogMemoryUsed', 'LogUserData',
'LogNotificationStatus', 'LogBacktrace',
),*/
);
Index: branches/5.2.x/core/admin_templates/logs/system_logs/system_log_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/logs/system_logs/system_log_edit.tpl
+++ branches/5.2.x/core/admin_templates/logs/system_logs/system_log_edit.tpl
@@ -143,6 +143,7 @@
</inp2:m_if>
<inp2:m_RenderElement name="inp_label" prefix="system-log" field="LogHostname"/>
+ <inp2:m_RenderElement name="inp_label" prefix="system-log" field="LogServerHostname"/>
<inp2:m_RenderElement name="inp_label" prefix="system-log" field="LogInterface"/>
<inp2:m_RenderElement name="inp_label" prefix="system-log" field="LogRequestSource"/>
Index: branches/5.2.x/core/install/english.lang
===================================================================
--- branches/5.2.x/core/install/english.lang
+++ branches/5.2.x/core/install/english.lang
@@ -544,6 +544,7 @@
<PHRASE Label="la_fld_LogRequestData" Module="Core" Type="1" Column="UmVxdWVzdCBEYXRh">UmVxdWVzdCBEYXRh</PHRASE>
<PHRASE Label="la_fld_LogRequestSource" Module="Core" Type="1" Column="UmVxdWVzdCBTb3VyY2U=">UmVxdWVzdCBTb3VyY2U=</PHRASE>
<PHRASE Label="la_fld_LogRequestURI" Module="Core" Type="1" Column="UmVxdWVzdCBVUkk=">UmVxdWVzdCBVUkk=</PHRASE>
+ <PHRASE Label="la_fld_LogServerHostname" Module="Core" Type="1" Column="U2VydmVyIEhvc3RuYW1l">U2VydmVyIEhvc3RuYW1l</PHRASE>
<PHRASE Label="la_fld_LogSessionData" Module="Core" Type="1" Column="U2Vzc2lvbiBEYXRh">U2Vzc2lvbiBEYXRh</PHRASE>
<PHRASE Label="la_fld_LogSessionKey" Module="Core" Type="1" Column="U2Vzc2lvbiBLZXk=">U2Vzc2lvbiBLZXk=</PHRASE>
<PHRASE Label="la_fld_LogSourceFileLine" Module="Core" Type="1" Column="U291cmNlIEZpbGUgTGluZQ==">U291cmNlIEZpbGUgTGluZQ==</PHRASE>
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
@@ -438,6 +438,7 @@
LogDate datetime DEFAULT NULL,
LogEventName varchar(100) NOT NULL DEFAULT '',
LogHostname varchar(255) NOT NULL DEFAULT '',
+ LogServerHostname varchar(255) NOT NULL DEFAULT '',
LogRequestSource tinyint(4) DEFAULT NULL,
LogRequestURI varchar(255) NOT NULL DEFAULT '',
LogRequestData longtext,
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
@@ -3009,3 +3009,5 @@
INSERT INTO SystemSettings VALUES (DEFAULT, 'SystemLogRequestDataRotationInterval', '2419200', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsLogs', 'la_config_SystemLogRequestDataRotationInterval', 'select', NULL, '86400=la_opt_OneDay||604800=la_opt_OneWeek||1209600=la_opt_TwoWeeks||2419200=la_opt_OneMonth||7257600=la_opt_ThreeMonths||29030400=la_opt_OneYear||-1=la_opt_SystemLogKeepForever', 65.04, 0, 1, 'hint:la_config_SystemLogRequestDataRotationInterval');
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 SystemLog ADD LogServerHostname varchar(255) NOT NULL DEFAULT '' AFTER LogHostname;
Index: branches/5.2.x/core/kernel/utility/logger.php
===================================================================
--- branches/5.2.x/core/kernel/utility/logger.php
+++ branches/5.2.x/core/kernel/utility/logger.php
@@ -376,6 +376,7 @@
'LogCode' => $code,
'LogType' => self::LT_OTHER,
'LogHostname' => $_SERVER['HTTP_HOST'],
+ 'LogServerHostname' => gethostname(),
'LogRequestSource' => php_sapi_name() == 'cli' ? 2 : 1,
'LogRequestURI' => php_sapi_name() == 'cli' ? implode(' ', $GLOBALS['argv']) : $_SERVER['REQUEST_URI'],
'LogUserId' => USER_GUEST,
Index: branches/5.2.x/core/units/logs/system_logs/system_logs_config.php
===================================================================
--- branches/5.2.x/core/units/logs/system_logs/system_logs_config.php
+++ branches/5.2.x/core/units/logs/system_logs/system_logs_config.php
@@ -143,6 +143,7 @@
'LogDate' => Array ('type' => 'string', 'default' => NULL),
'LogEventName' => Array ('type' => 'string', 'max_len' => 100, 'not_null' => 1, 'default' => ''),
'LogHostname' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
+ 'LogServerHostname' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'LogRequestSource' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'Web', 2 => 'CLI'),
@@ -215,6 +216,7 @@
'LogTimestamp' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'LogEventName' => Array ('filter_block' => 'grid_like_filter'),
'LogHostname' => Array ('filter_block' => 'grid_like_filter'),
+ 'LogServerHostname' => Array ('filter_block' => 'grid_like_filter'),
'LogRequestSource' => Array ('filter_block' => 'grid_options_filter'),
'LogRequestURI' => Array ('data_block' => 'grid_uri_td', 'filter_block' => 'grid_like_filter'),
'Username' => Array ('filter_block' => 'grid_range_filter', 'width' => 80),
Event Timeline
Log In to Comment