Difference between revisions of "PHP Tail"

From Amahi Wiki
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
* HDA Production
 
* HDA Production
 
* Boot
 
* Boot
* DNF
 
  
  
 
To include additional logs, you must edit the <i>Log.php</i> (located in <code>/var/hda/web-apps/phptail/html</code>).  
 
To include additional logs, you must edit the <i>Log.php</i> (located in <code>/var/hda/web-apps/phptail/html</code>).  
  
Select <i>Settings</i> from the menu and choose <i>Edit Config</i> in the <b>PHP Tail Settings</b> popup window.  
+
Select <i>Settings</i> from the menu and choose <i>Edit Config</i> in the <b>PHP Tail Settings</b> popup window. You can now edit the <i>Log.php</i> in your web browser. 
  
You can now edit the <i>Log.php</i> in your web browser. 
+
Once finished, choose <b>Save and Continue</b>. As a precaution, a timestamped backup of <i>Log.php</i> before the changes will be saved.
 
 
Once finished, choose <b>Save and Continue</b>.  
 
  
 
For example to add the <b>Greyhole</b> log file, you would make the following change:
 
For example to add the <b>Greyhole</b> log file, you would make the following change:
Line 24: Line 21:
 
     "HDA Production" => "/var/hda/platform/html/log/production.log",
 
     "HDA Production" => "/var/hda/platform/html/log/production.log",
 
     "Boot" => "/var/log/boot.log",
 
     "Boot" => "/var/log/boot.log",
    "DNF" => "/var/log/dnf.log",
 
 
));
 
));
 
</pre>
 
</pre>
Line 30: Line 26:
 
<pre>
 
<pre>
 
$tail = new PHPTail(array(
 
$tail = new PHPTail(array(
 +
    "Greyhole" => "/var/log/greyhole.log",
 +
    "Sync" => "/var/log/amahi-sync.log",
 +
    "Anywhere" => "/var/log/amahi-anywhere.log",
 
     "App Install" => "/var/log/amahi-app-installer.log",
 
     "App Install" => "/var/log/amahi-app-installer.log",
 
     "HDA Updates" => "/var/log/hda-updates.log",
 
     "HDA Updates" => "/var/log/hda-updates.log",
 
     "HDA Production" => "/var/hda/platform/html/log/production.log",
 
     "HDA Production" => "/var/hda/platform/html/log/production.log",
 
     "Boot" => "/var/log/boot.log",
 
     "Boot" => "/var/log/boot.log",
     "DNF" => "/var/log/dnf.log",
+
     "Messages" => "/var/log/messages",
    "Greyhole" => "/var/log/greyhole.log",
+
     "Monit" => "/var/log/monit.log",
    "Sync" => "/var/log/amahi-sync.log",
 
     "Anywhere" => "/var/log/amahi-anywhere.log",
 
 
));
 
));
 
</pre>
 
</pre>

Latest revision as of 17:22, 26 July 2020

Msgbox-WOPr.png Work In Progress
This article is currently undergoing major expansion or restructuring. You are welcome to assist by editing it as well. If this article has not been edited in several days, please remove this template.


By default, PHP Tail is configured for the following log files:

  • App Install
  • HDA Updates
  • HDA Production
  • Boot


To include additional logs, you must edit the Log.php (located in /var/hda/web-apps/phptail/html).

Select Settings from the menu and choose Edit Config in the PHP Tail Settings popup window. You can now edit the Log.php in your web browser.

Once finished, choose Save and Continue. As a precaution, a timestamped backup of Log.php before the changes will be saved.

For example to add the Greyhole log file, you would make the following change:

Before:
$tail = new PHPTail(array(
    "App Install" => "/var/log/amahi-app-installer.log",
    "HDA Updates" => "/var/log/hda-updates.log",
    "HDA Production" => "/var/hda/platform/html/log/production.log",
    "Boot" => "/var/log/boot.log",
));
After:
$tail = new PHPTail(array(
    "Greyhole" => "/var/log/greyhole.log",
    "Sync" => "/var/log/amahi-sync.log",
    "Anywhere" => "/var/log/amahi-anywhere.log",
    "App Install" => "/var/log/amahi-app-installer.log",
    "HDA Updates" => "/var/log/hda-updates.log",
    "HDA Production" => "/var/hda/platform/html/log/production.log",
    "Boot" => "/var/log/boot.log",
    "Messages" => "/var/log/messages",
    "Monit" => "/var/log/monit.log",
));

You can add any log file, providing it is readable by your user. Unfortuntately, those that require root access, will not be work.

The order of the files is how they will appear in the Files drop-down menu in the application. If you want a specific file first, reorder the list in Log.php.