Server Log Script, Draft #1

9 Jan

Here’s the first real addition to the code repository.

Server Log script, draft 1,

also it’s up on the code repository page

It runs, but I’m already working on improvements (there are some problems with all my servers being on different machines but I’ll describe all that in the next post, right after this one).

Here’s what it does:

  • reads the server.log file
  • echos it right to the page
  • all straight php

Here’s what it’ll do once I get those improvements:

  • put each line from the server.log file into a mysql database
  • the lines get logged with the time from the server.log file
  • then the lines get reverse sorted by time
  • read out the lines after the reverse sort

After the improvements the page will show the server log with the most recent activity at the top. Also, since it’s using mysql I can put a form at the top that allows someone to specify the number of lines that get displayed to screen (with some default value).

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: