<cAppLog>.TextFile.FileNameAuto

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > AppLog > cAppLog Class > <cAppLog> Objects > <cAppLog>.TextFile >

<cAppLog>.TextFile.FileNameAuto

 

Description

 

Automatic log file name calculation strategy giving log file name parts.

 

Syntax

 

logFileName = <cAppLog>.TextFile.FileNameAuto(sPath, sFile, TimeLogic, sExt [, RetentionDays])

 

Returns

 

True for enabled output, otherwise False.

 

Parameters

 

Name

Type

Optional

Meaning

sPath

String

No

Log file path.

Can be absolute or relative.

If relative, it will be relative to script path

 

ATTENTION: If sPath does not exists it will be created

sFile

String

No

File name part

TimeLogic

String

No

Time code logic.

If empty string nothing will happen

If "11", a string with YYYYMMDD_HHMMSS will be added to file name

sExt

String

No

File extension

RetentionDays

String

Yes

STILL NOT ACTIVE AT THE MOMENT, more tests needed
 
Number of days to retain log files in Log file path sPath having sFile and sExt.

 

ATTENTION:  destructive parameter if present!!

 

Remarks

 

If sPath does not exists it will be created

RetentionDays, if present, is a destructive parameter

 

Restrictions

 

See also

 

Examples

 

uses "AppLog"

 

dim myLog as new cAppLog

 

myLog.TextFile.FileNameAuto