www.webdeveloper.com
Results 1 to 3 of 3

Thread: Reading/Tailing a log file

  1. #1
    Join Date
    Oct 2013
    Posts
    2

    Reading/Tailing a log file

    Hello WebDevelopers

    i need to show a console log on my website, and I would like to know how to read/tail a text file and show it with styling,

    my first thoughts was to pass the text into an array line by line, and I would like to ouput every entry in a <div class"something"></div> tag. and on top of that i would like to apply a different class to any line including the words [ERROR] or [WARNING]

    I would like to end up with having the last 50 lines or so shown on the site, and then have all errors and warning lines marked with red


    thx in advance

  2. #2
    Join Date
    Mar 2009
    Posts
    485
    This is essentially a server side problem. Are you using server side javascript as in node.js? Or is your request based on how to process the data after its been sent to the browser? If so, how is this accomplished? Are you using AJAX, ioSocket, or what?

    How is the data being sent to the browser?
    Last edited by Tcobb; 10-18-2013 at 02:22 PM.

  3. #3
    Join Date
    Oct 2013
    Posts
    2
    Quote Originally Posted by Tcobb View Post
    This is essentially a server side problem. Are you using server side javascript as in node.js? Or is your request based on how to process the data after its been sent to the browser? If so, how is this accomplished? Are you using AJAX, ioSocket, or what?

    How is the data being sent to the browser?

    The log file is a local file located in /var/www
    i've considered using AJAX, but i also stumbled upon something concerning ioSocket, but i have no idea which one to use.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles