aboutsummaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/UConfig.pas10
-rw-r--r--src/base/ULog.pas16
2 files changed, 23 insertions, 3 deletions
diff --git a/src/base/UConfig.pas b/src/base/UConfig.pas
index e48b5493..23ef0f3f 100644
--- a/src/base/UConfig.pas
+++ b/src/base/UConfig.pas
@@ -203,6 +203,16 @@ const
(LIBSAMPLERATE_VERSION_RELEASE * VERSION_RELEASE);
{$ENDIF}
+ {$IFNDEF lua_VERSION_MAJOR}
+ LUA_VERSION_MAJOR = '5';
+ {$ENDIF}
+ {$IFNDEF lua_VERSION_MINOR}
+ LUA_VERSION_MINOR = '1';
+ {$ENDIF}
+ {$IFNDEF lua_VERSION_RELEASE}
+ LUA_VERSION_RELEASE = '4';
+ {$ENDIF}
+
function USDXVersionStr(): string;
function USDXShortVersionStr(): string;
diff --git a/src/base/ULog.pas b/src/base/ULog.pas
index ea3cda4e..bde4d4e4 100644
--- a/src/base/ULog.pas
+++ b/src/base/ULog.pas
@@ -100,6 +100,8 @@ type
procedure SetLogLevel(Level: integer);
function GetLogLevel(): integer;
+ procedure SetLogFileLevel(Level: integer);
+ function GetLogFileLevel(): integer;
procedure LogMsg(const Text: string; Level: integer); overload;
procedure LogMsg(const Msg, Context: string; Level: integer); overload; {$IFDEF HasInline}inline;{$ENDIF}
@@ -311,13 +313,21 @@ begin
Result := LogLevel;
end;
+procedure TLog.SetLogFileLevel(Level: integer);
+begin
+ LogFileLevel := Level;
+end;
+
+function TLog.GetLogFileLevel(): integer;
+begin
+ Result := LogFileLevel;
+end;
+
procedure TLog.LogMsg(const Text: string; Level: integer);
var
LogMsg: string;
begin
- // TODO: what if (LogFileLevel < LogLevel)? Log to file without printing to
- // console or do not log at all? At the moment nothing is logged.
- if (Level <= LogLevel) then
+ if ((Level <= LogLevel) or (Level <= LogFileLevel)) then
begin
if (Level <= LOG_LEVEL_CRITICAL_MAX) then
LogMsg := 'CRITICAL: ' + Text