<?php
 
include "class.XLog.php";
 
 
$log = new XLog();
 
 
# SET THE PATH TO THE LOG FILE
 
$log_file_php     = $_SERVER['DOCUMENT_ROOT'].'/xlog/logs/log.php';
 
 
# The message
 
$msg_php     = "<strong>A log entry into a php file</strong>";
 
 
# Log messages in a php file
 
$log->Write($msg_php, __FILE__, __LINE__, FALSE, $log_file_php);
 
 
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 
    <title>Using the XLog class</title>
 
</head>
 
<body>
 
 
<h4 style="font-weight: normal;">The content of the log file <strong><?php echo $log_file_php;?></strong> is displayed below:</h4>
 
 
<p>The size of the log file is: <strong><?php echo $log->GetFileSize($log_file_php);?></strong></p>
 
 
<div style="margin: 25px; border: solid 1px #ccc; padding: 5px;">
 
    <pre><?php echo $log->GetContent($log_file_php);?></pre>
 
</div>
 
 
</body>
 
</html>
 
 
 |