PHP Class DeploynautLogFile

Afficher le fichier Open project: silverstripe/deploynaut Class Usage Examples

Protected Properties

Свойство Type Description
$basePath
$logFile

Méthodes publiques

Méthode Description
__construct ( string $logFile, string | null $basePath = null )
content ( ) : string Return the content of the log file.
exists ( ) : boolean Does the log file exist?
getLogFilePath ( ) : string | null Return log file path, assuming it exists. Returns NULL if nothing found.
getRawFilePath ( ) : string Return the un-sanitised log path.
getSanitisedLogFilePath ( ) : string Get the sanitised log path.
setBasePath ( string $path ) Set the base path of where logs reside
setLogFile ( string $filename ) Set the log filename
write ( string $message ) Write a message line into the log file.

Method Details

__construct() public méthode

public __construct ( string $logFile, string | null $basePath = null )
$logFile string The log filename
$basePath string | null Base path of where logs reside. Defaults to DEPLOYNAUT_LOG_PATH

content() public méthode

Return the content of the log file.
public content ( ) : string
Résultat string

exists() public méthode

Does the log file exist?
public exists ( ) : boolean
Résultat boolean

getLogFilePath() public méthode

Return log file path, assuming it exists. Returns NULL if nothing found.
public getLogFilePath ( ) : string | null
Résultat string | null

getRawFilePath() public méthode

Return the un-sanitised log path.
public getRawFilePath ( ) : string
Résultat string

getSanitisedLogFilePath() public méthode

Get the sanitised log path.
public getSanitisedLogFilePath ( ) : string
Résultat string

setBasePath() public méthode

Set the base path of where logs reside
public setBasePath ( string $path )
$path string

setLogFile() public méthode

Set the log filename
public setLogFile ( string $filename )
$filename string

write() public méthode

Write a message line into the log file.
public write ( string $message )
$message string

Property Details

$basePath protected_oe property

protected $basePath

$logFile protected_oe property

protected $logFile