-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmLogViewer.pas
56 lines (47 loc) · 1.5 KB
/
frmLogViewer.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
unit frmLogViewer;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, SynEdit, SynEditHighlighter,
SynHighlighterIni, Vcl.ComCtrls, SynHighlighterMsg,
SynHighlighterUNIXShellScript, Vcl.ToolWin, Vcl.ActnMan, Vcl.ActnCtrls,
System.Actions, Vcl.ActnList, Vcl.PlatformDefaultStyleActnCtrls, TextEditor;
type
TformLogViewer = class(TForm)
LogViewer: TSynEdit;
StatusBar1: TStatusBar;
SynUNIXShellScriptSyn1: TSynUNIXShellScriptSyn;
PageControl1: TPageControl;
TabSheet1: TTabSheet;
ActionToolBar1: TActionToolBar;
ActionManager1: TActionManager;
Action1: TAction;
TabSheet2: TTabSheet;
httpdoutput: TSynEdit;
TabSheet3: TTabSheet;
mysqloutput: TSynEdit;
TextEditor1: TTextEditor;
procedure Action1Execute(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
formLogViewer: TformLogViewer;
implementation
{$R *.dfm}
procedure TformLogViewer.Action1Execute(Sender: TObject);
begin
if FileExists(ExtractFilePath(ParamStr(0))+'content\apache2\logs\error.log') then
begin
LogViewer.Lines.Clear;
LogViewer.Lines.SaveToFile(ExtractFilePath(ParamStr(0))+'content\apache2\logs\error.log');
end;
end;
procedure TformLogViewer.FormCreate(Sender: TObject);
begin
EnableImmersiveDarkMode(True);
end;
end.