diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-02-05 11:40:45 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-02-05 11:40:45 +0000 |
commit | c4eae67bc403eb26af8a1c91f9eb67dc92a8b4b6 (patch) | |
tree | 7d412d95013d562baae3070ef5b767ddd48fa61e /Game/Code/lib/JEDI-SDL/SDL/Pas/logger.pas | |
parent | 1cec357365c6260da0667966460387aaffa76436 (diff) | |
download | usdx-c4eae67bc403eb26af8a1c91f9eb67dc92a8b4b6.tar.gz usdx-c4eae67bc403eb26af8a1c91f9eb67dc92a8b4b6.tar.xz usdx-c4eae67bc403eb26af8a1c91f9eb67dc92a8b4b6.zip |
updated to latest version of JEDI SDL
JEDI-SDL v1.0 Final RC ( 2008-01-29 05:46 )
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@811 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/lib/JEDI-SDL/SDL/Pas/logger.pas | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Game/Code/lib/JEDI-SDL/SDL/Pas/logger.pas b/Game/Code/lib/JEDI-SDL/SDL/Pas/logger.pas index 88bb1698..461fa261 100644 --- a/Game/Code/lib/JEDI-SDL/SDL/Pas/logger.pas +++ b/Game/Code/lib/JEDI-SDL/SDL/Pas/logger.pas @@ -1,6 +1,6 @@ unit logger;
{
- $Id: logger.pas,v 1.1 2004/02/05 00:08:20 savage Exp $
+ $Id: logger.pas,v 1.2 2006/11/26 16:58:04 savage Exp $
}
{******************************************************************************}
@@ -63,6 +63,9 @@ unit logger; {******************************************************************************}
{
$Log: logger.pas,v $
+ Revision 1.2 2006/11/26 16:58:04 savage
+ Modifed to create separate log files. Therefore each instance running from the same directory will have their own individual log file, prepended with a number.
+
Revision 1.1 2004/02/05 00:08:20 savage
Module 1.0 release
@@ -107,10 +110,20 @@ implementation { TLogger }
constructor TLogger.Create;
+var
+ FileName : string;
+ FileNo : integer;
begin
FApplicationName := ExtractFileName( ParamStr(0) );
FApplicationPath := ExtractFilePath( ParamStr(0) );
- AssignFile( FFileHandle, FApplicationPath + ChangeFileExt( FApplicationName, '.log' ) );
+ FileName := FApplicationPath + ChangeFileExt( FApplicationName, '.log' );
+ FileNo := 0;
+ while FileExists( FileName ) do
+ begin
+ inc( FileNo );
+ FileName := FApplicationPath + IntToStr( FileNo ) + ChangeFileExt( FApplicationName, '.log' )
+ end;
+ AssignFile( FFileHandle, FileName );
ReWrite( FFileHandle );
(*inherited Create( FApplicationPath + ChangeFileExt( FApplicationName, '.log' ),
fmCreate {$IFNDEF FPC}or fmShareExclusive{$ENDIF} );*)
|