Skip to content
Snippets Groups Projects
Commit 71640c40 authored by rswindell's avatar rswindell
Browse files

Log level output is adjustable for all servers now.

parent 22e79fe3
No related branches found
No related tags found
No related merge requests found
Showing with 220 additions and 18 deletions
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -55,4 +55,16 @@ void __fastcall TFtpForm::FormHide(TObject *Sender) ...@@ -55,4 +55,16 @@ void __fastcall TFtpForm::FormHide(TObject *Sender)
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TFtpForm::LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction)
{
if(NewValue < 0 || NewValue > LOG_DEBUG)
AllowChange = false;
else {
MainForm->ftp_startup.log_level = NewValue;
LogLevelText->Caption = LogLevelDesc[NewValue];
MainForm->SaveIniSettings(Sender);
}
}
//---------------------------------------------------------------------------
object FtpForm: TFtpForm object FtpForm: TFtpForm
Left = 856 Left = 709
Top = 689 Top = 771
Width = 350 Width = 469
Height = 150 Height = 150
Caption = 'FTP Server' Caption = 'FTP Server'
Color = clBtnFace Color = clBtnFace
...@@ -19,7 +19,7 @@ object FtpForm: TFtpForm ...@@ -19,7 +19,7 @@ object FtpForm: TFtpForm
object ToolBar: TToolBar object ToolBar: TToolBar
Left = 0 Left = 0
Top = 0 Top = 0
Width = 342 Width = 461
Height = 25 Height = 25
Caption = 'ToolBar' Caption = 'ToolBar'
EdgeBorders = [] EdgeBorders = []
...@@ -98,11 +98,42 @@ object FtpForm: TFtpForm ...@@ -98,11 +98,42 @@ object FtpForm: TFtpForm
Step = 1 Step = 1
TabOrder = 1 TabOrder = 1
end end
object ToolButton4: TToolButton
Left = 341
Top = 0
Width = 8
Caption = 'ToolButton4'
ImageIndex = 7
Style = tbsSeparator
end
object LogLevelText: TStaticText
Left = 349
Top = 0
Width = 75
Height = 22
Hint = 'Web Server Log Level'
AutoSize = False
BorderStyle = sbsSunken
TabOrder = 2
end
object LogLevelUpDown: TUpDown
Left = 424
Top = 0
Width = 16
Height = 22
Hint = 'Log Level Adjustment'
Min = 0
Max = 7
Position = 0
TabOrder = 3
Wrap = False
OnChangingEx = LogLevelUpDownChangingEx
end
end end
object Log: TRichEdit object Log: TRichEdit
Left = 0 Left = 0
Top = 25 Top = 25
Width = 342 Width = 461
Height = 92 Height = 92
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -61,7 +61,12 @@ __published: // IDE-managed Components ...@@ -61,7 +61,12 @@ __published: // IDE-managed Components
TProgressBar *ProgressBar; TProgressBar *ProgressBar;
TToolButton *RecycleButton; TToolButton *RecycleButton;
TRichEdit *Log; TRichEdit *Log;
TToolButton *ToolButton4;
TStaticText *LogLevelText;
TUpDown *LogLevelUpDown;
void __fastcall FormHide(TObject *Sender); void __fastcall FormHide(TObject *Sender);
void __fastcall LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction);
private: // User declarations private: // User declarations
public: // User declarations public: // User declarations
__fastcall TFtpForm(TComponent* Owner); __fastcall TFtpForm(TComponent* Owner);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -54,4 +54,16 @@ void __fastcall TMailForm::FormHide(TObject *Sender) ...@@ -54,4 +54,16 @@ void __fastcall TMailForm::FormHide(TObject *Sender)
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TMailForm::LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction)
{
if(NewValue < 0 || NewValue > LOG_DEBUG)
AllowChange = false;
else {
MainForm->mail_startup.log_level = NewValue;
LogLevelText->Caption = LogLevelDesc[NewValue];
MainForm->SaveIniSettings(Sender);
}
}
//---------------------------------------------------------------------------
object MailForm: TMailForm object MailForm: TMailForm
Left = 670 Left = 670
Top = 170 Top = 170
Width = 350 Width = 480
Height = 150 Height = 150
Caption = 'Mail Server' Caption = 'Mail Server'
Color = clBtnFace Color = clBtnFace
...@@ -21,7 +21,7 @@ object MailForm: TMailForm ...@@ -21,7 +21,7 @@ object MailForm: TMailForm
object ToolBar: TToolBar object ToolBar: TToolBar
Left = 0 Left = 0
Top = 0 Top = 0
Width = 342 Width = 472
Height = 25 Height = 25
Caption = 'ToolBar' Caption = 'ToolBar'
EdgeBorders = [] EdgeBorders = []
...@@ -101,11 +101,42 @@ object MailForm: TMailForm ...@@ -101,11 +101,42 @@ object MailForm: TMailForm
Step = 1 Step = 1
TabOrder = 1 TabOrder = 1
end end
object ToolButton2: TToolButton
Left = 341
Top = 0
Width = 8
Caption = 'ToolButton2'
ImageIndex = 7
Style = tbsSeparator
end
object LogLevelText: TStaticText
Left = 349
Top = 0
Width = 75
Height = 22
Hint = 'Web Server Log Level'
AutoSize = False
BorderStyle = sbsSunken
TabOrder = 2
end
object LogLevelUpDown: TUpDown
Left = 424
Top = 0
Width = 16
Height = 22
Hint = 'Log Level Adjustment'
Min = 0
Max = 7
Position = 0
TabOrder = 3
Wrap = False
OnChangingEx = LogLevelUpDownChangingEx
end
end end
object Log: TRichEdit object Log: TRichEdit
Left = 0 Left = 0
Top = 25 Top = 25
Width = 342 Width = 472
Height = 92 Height = 92
Align = alClient Align = alClient
Font.Charset = DEFAULT_CHARSET Font.Charset = DEFAULT_CHARSET
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -61,7 +61,12 @@ __published: // IDE-managed Components ...@@ -61,7 +61,12 @@ __published: // IDE-managed Components
TProgressBar *ProgressBar; TProgressBar *ProgressBar;
TToolButton *RecycleButton; TToolButton *RecycleButton;
TRichEdit *Log; TRichEdit *Log;
TToolButton *ToolButton2;
TStaticText *LogLevelText;
TUpDown *LogLevelUpDown;
void __fastcall FormHide(TObject *Sender); void __fastcall FormHide(TObject *Sender);
void __fastcall LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction);
private: // User declarations private: // User declarations
public: // User declarations public: // User declarations
__fastcall TMailForm(TComponent* Owner); __fastcall TMailForm(TComponent* Owner);
......
...@@ -2416,6 +2416,10 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender) ...@@ -2416,6 +2416,10 @@ void __fastcall TMainForm::StartupTimerTick(TObject *Sender)
ServiceStatusTimer->Enabled=true; ServiceStatusTimer->Enabled=true;
TelnetForm->LogLevelUpDown->Position=bbs_startup.log_level; TelnetForm->LogLevelUpDown->Position=bbs_startup.log_level;
FtpForm->LogLevelUpDown->Position=ftp_startup.log_level;
MailForm->LogLevelUpDown->Position=mail_startup.log_level;
WebForm->LogLevelUpDown->Position=web_startup.log_level;
ServicesForm->LogLevelUpDown->Position=services_startup.log_level;
if(!Application->Active) /* Starting up minimized? */ if(!Application->Active) /* Starting up minimized? */
FormMinimize(Sender); /* Put icon in systray */ FormMinimize(Sender); /* Put icon in systray */
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -54,3 +54,18 @@ void __fastcall TServicesForm::FormHide(TObject *Sender) ...@@ -54,3 +54,18 @@ void __fastcall TServicesForm::FormHide(TObject *Sender)
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TServicesForm::LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction)
{
if(NewValue < 0 || NewValue > LOG_DEBUG)
AllowChange = false;
else {
MainForm->services_startup.log_level = NewValue;
LogLevelText->Caption = LogLevelDesc[NewValue];
MainForm->SaveIniSettings(Sender);
}
}
//---------------------------------------------------------------------------
...@@ -83,6 +83,37 @@ object ServicesForm: TServicesForm ...@@ -83,6 +83,37 @@ object ServicesForm: TServicesForm
Caption = 'Down' Caption = 'Down'
TabOrder = 0 TabOrder = 0
end end
object ToolButton3: TToolButton
Left = 258
Top = 0
Width = 8
Caption = 'ToolButton3'
ImageIndex = 6
Style = tbsSeparator
end
object LogLevelText: TStaticText
Left = 266
Top = 0
Width = 75
Height = 22
Hint = 'Web Server Log Level'
AutoSize = False
BorderStyle = sbsSunken
TabOrder = 1
end
object LogLevelUpDown: TUpDown
Left = 341
Top = 0
Width = 16
Height = 22
Hint = 'Log Level Adjustment'
Min = 0
Max = 7
Position = 0
TabOrder = 2
Wrap = False
OnChangingEx = LogLevelUpDownChangingEx
end
end end
object Log: TRichEdit object Log: TRichEdit
Left = 0 Left = 0
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -58,7 +58,12 @@ __published: // IDE-managed Components ...@@ -58,7 +58,12 @@ __published: // IDE-managed Components
TStaticText *Status; TStaticText *Status;
TToolButton *RecycleButton; TToolButton *RecycleButton;
TRichEdit *Log; TRichEdit *Log;
TToolButton *ToolButton3;
TStaticText *LogLevelText;
TUpDown *LogLevelUpDown;
void __fastcall FormHide(TObject *Sender); void __fastcall FormHide(TObject *Sender);
void __fastcall LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction);
private: // User declarations private: // User declarations
public: // User declarations public: // User declarations
__fastcall TServicesForm(TComponent* Owner); __fastcall TServicesForm(TComponent* Owner);
......
...@@ -60,7 +60,7 @@ void __fastcall TTelnetForm::LogLevelUpDownChangingEx(TObject *Sender, ...@@ -60,7 +60,7 @@ void __fastcall TTelnetForm::LogLevelUpDownChangingEx(TObject *Sender,
AllowChange = false; AllowChange = false;
else { else {
MainForm->bbs_startup.log_level = NewValue; MainForm->bbs_startup.log_level = NewValue;
LogLevelText->Caption = LogLevelDesc[MainForm->bbs_startup.log_level]; LogLevelText->Caption = LogLevelDesc[NewValue];
MainForm->SaveIniSettings(Sender); MainForm->SaveIniSettings(Sender);
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -47,3 +47,18 @@ __fastcall TWebForm::TWebForm(TComponent* Owner) ...@@ -47,3 +47,18 @@ __fastcall TWebForm::TWebForm(TComponent* Owner)
MainForm=(TMainForm*)Application->MainForm; MainForm=(TMainForm*)Application->MainForm;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void __fastcall TWebForm::LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction)
{
if(NewValue < 0 || NewValue > LOG_DEBUG)
AllowChange = false;
else {
MainForm->web_startup.log_level = NewValue;
LogLevelText->Caption = LogLevelDesc[NewValue];
MainForm->SaveIniSettings(Sender);
}
}
//---------------------------------------------------------------------------
...@@ -103,6 +103,37 @@ object WebForm: TWebForm ...@@ -103,6 +103,37 @@ object WebForm: TWebForm
Step = 1 Step = 1
TabOrder = 1 TabOrder = 1
end end
object ToolButton4: TToolButton
Left = 341
Top = 0
Width = 8
Caption = 'ToolButton4'
ImageIndex = 7
Style = tbsSeparator
end
object LogLevelText: TStaticText
Left = 349
Top = 0
Width = 75
Height = 22
Hint = 'Web Server Log Level'
AutoSize = False
BorderStyle = sbsSunken
TabOrder = 2
end
object LogLevelUpDown: TUpDown
Left = 424
Top = 0
Width = 16
Height = 22
Hint = 'Log Level Adjustment'
Min = 0
Max = 7
Position = 0
TabOrder = 3
Wrap = False
OnChangingEx = LogLevelUpDownChangingEx
end
end end
object Log: TRichEdit object Log: TRichEdit
Left = 0 Left = 0
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* * * *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html * * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html *
* * * *
* This program is free software; you can redistribute it and/or * * This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License * * modify it under the terms of the GNU General Public License *
...@@ -57,6 +57,11 @@ __published: // IDE-managed Components ...@@ -57,6 +57,11 @@ __published: // IDE-managed Components
TToolButton *ToolButton3; TToolButton *ToolButton3;
TProgressBar *ProgressBar; TProgressBar *ProgressBar;
TRichEdit *Log; TRichEdit *Log;
TToolButton *ToolButton4;
TStaticText *LogLevelText;
TUpDown *LogLevelUpDown;
void __fastcall LogLevelUpDownChangingEx(TObject *Sender,
bool &AllowChange, short NewValue, TUpDownDirection Direction);
private: // User declarations private: // User declarations
public: // User declarations public: // User declarations
__fastcall TWebForm(TComponent* Owner); __fastcall TWebForm(TComponent* Owner);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment