mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Add preference option for adding timestamp to log messages. Helpful for debugging performance issues.
This commit is contained in:
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: HeidiSQL\n"
|
||||
"POT-Creation-Date: 2012-11-05 21:40\n"
|
||||
"PO-Revision-Date: 2022-10-03 08:54+0200\n"
|
||||
"PO-Revision-Date: 2022-10-20 18:45+0200\n"
|
||||
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
|
||||
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/language/en/)\n"
|
||||
"Language: en\n"
|
||||
@ -2802,6 +2802,9 @@ msgstr "Enable query history"
|
||||
msgid "days to keep queries before removing them"
|
||||
msgstr "days to keep queries before removing them"
|
||||
|
||||
msgid "Add timestamp to all log messages"
|
||||
msgstr "Add timestamp to all log messages"
|
||||
|
||||
#. optionsform..pagecontrolMain..tabSQL..lblFont..Caption
|
||||
#: options.dfm:357
|
||||
msgid "Editor font:"
|
||||
|
@ -192,7 +192,7 @@ type
|
||||
asTabsToSpaces, asFilterPanel, asAllowMultipleInstances, asFindDialogSearchHistory, asGUIFontName, asGUIFontSize,
|
||||
asTheme, asIconPack, asWebSearchBaseUrl,
|
||||
asFindDialogReplaceHistory, asMaxQueryResults, asLogErrors,
|
||||
asLogUserSQL, asLogSQL, asLogInfos, asLogDebug, asLogScript, asFieldColorNumeric,
|
||||
asLogUserSQL, asLogSQL, asLogInfos, asLogDebug, asLogScript, asLogTimestamp, asFieldColorNumeric,
|
||||
asFieldColorReal, asFieldColorText, asFieldColorBinary, asFieldColorDatetime, asFieldColorSpatial,
|
||||
asFieldColorOther, asFieldEditorBinary, asFieldEditorDatetime, asFieldEditorDatetimePrefill, asFieldEditorEnum,
|
||||
asFieldEditorSet, asFieldNullBackground, asRowBackgroundEven, asRowBackgroundOdd, asGroupTreeObjects, asDisplayObjectSizeColumn, asSQLfile,
|
||||
@ -3753,6 +3753,7 @@ begin
|
||||
InitSetting(asLogScript, 'LogScript', 0, False);
|
||||
InitSetting(asLogInfos, 'LogInfos', 0, True);
|
||||
InitSetting(asLogDebug, 'LogDebug', 0, False);
|
||||
InitSetting(asLogTimestamp, 'LogTimestamp', 0, False);
|
||||
InitSetting(asFieldColorNumeric, 'FieldColor_Numeric', $00FF0000);
|
||||
InitSetting(asFieldColorReal, 'FieldColor_Real', $00FF0048);
|
||||
InitSetting(asFieldColorText, 'FieldColor_Text', $00008000);
|
||||
|
@ -5427,7 +5427,10 @@ var
|
||||
begin
|
||||
LogItem := TDBLogItem.Create;
|
||||
LogItem.Category := Category;
|
||||
LogItem.LineText := Msg;
|
||||
if AppSettings.ReadBool(asLogTimestamp) then
|
||||
LogItem.LineText := '['+FormatDateTime('hh:nn:ss.zzz', Now)+'] '+ Msg
|
||||
else
|
||||
LogItem.LineText := Msg;
|
||||
LogItem.Connection := Connection;
|
||||
PostponedLogItems.Add(LogItem);
|
||||
|
||||
|
@ -13,7 +13,6 @@ object frmPreferences: TfrmPreferences
|
||||
Font.Height = -12
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poMainFormCenter
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
@ -21,7 +20,6 @@ object frmPreferences: TfrmPreferences
|
||||
DesignSize = (
|
||||
722
|
||||
460)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 14
|
||||
object pagecontrolMain: TPageControl
|
||||
Left = 8
|
||||
@ -551,6 +549,15 @@ object frmPreferences: TfrmPreferences
|
||||
TabOrder = 9
|
||||
OnClick = Modified
|
||||
end
|
||||
object chkLogTimestamp: TCheckBox
|
||||
Left = 220
|
||||
Top = 292
|
||||
Width = 475
|
||||
Height = 17
|
||||
Caption = 'Add timestamp to all log messages'
|
||||
TabOrder = 16
|
||||
OnClick = Modified
|
||||
end
|
||||
end
|
||||
object tabSQL: TTabSheet
|
||||
Caption = 'SQL'
|
||||
|
@ -179,6 +179,7 @@ type
|
||||
editRealTrailingZeros: TEdit;
|
||||
updownRealTrailingZeros: TUpDown;
|
||||
lblRealTrailingZerosHint: TLabel;
|
||||
chkLogTimestamp: TCheckBox;
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure Modified(Sender: TObject);
|
||||
procedure Apply(Sender: TObject);
|
||||
@ -311,6 +312,7 @@ begin
|
||||
AppSettings.WriteBool(asQueryHistoryEnabled, chkQueryHistory.Checked);
|
||||
AppSettings.WriteInt(asQueryHistoryKeepDays, updownQueryHistoryKeepDays.Position);
|
||||
AppSettings.WriteBool(asLogHorizontalScrollbar, chkHorizontalScrollbar.Checked);
|
||||
AppSettings.WriteBool(asLogTimestamp, chkLogTimestamp.Checked);
|
||||
for i:=0 to SynSQLSynSQLSample.AttrCount - 1 do begin
|
||||
Attri := SynSQLSynSQLSample.Attribute[i];
|
||||
AppSettings.WriteInt(asHighlighterForeground, Attri.Foreground, Attri.Name);
|
||||
@ -683,6 +685,7 @@ begin
|
||||
chkQueryHistory.Checked := AppSettings.ReadBool(asQueryHistoryEnabled);
|
||||
updownQueryHistoryKeepDays.Position := AppSettings.ReadInt(asQueryHistoryKeepDays);
|
||||
chkHorizontalScrollbar.Checked := AppSettings.ReadBool(asLogHorizontalScrollbar);
|
||||
chkLogTimestamp.Checked := AppSettings.ReadBool(asLogTimestamp);
|
||||
|
||||
// Default column width in grids:
|
||||
updownMaxColWidth.Position := AppSettings.ReadInt(asMaxColWidth);
|
||||
|
Reference in New Issue
Block a user