Results 1 to 5 of 5

Thread: sysklogd - File SSI

  1. #1

    sysklogd - File SSI

    Hello,

    I configured sysklogd to gather logs from all my Cisco devices, and created a web page to view the logs from any PC on the network. I'm using the following code that I got off the web for doing this (see bottom of post)

    The problem is that the output of this file does not word wrap, and it's very jumbled to view. If I do a "cat syslog" the file views fine, but in the browser there are several entries on each line. Is there any way to format the output? Create some sort of table or border to not allow it to have multiple events on each line? Is there some other app I can use to point to my log file to read it?

    Thanks,

    Scott

    <html>
    <head>
    <title>Enterprise Syslog Log File</title>
    </head>
    <body>
    <center>
    <h2>
    MyCorp Enterprise Syslog Log
    </h2>
    </center>
    <!--#include file="enterprise.log" -->
    <br>
    </body>
    </html>

  2. #2
    Administrator Advisor peter's Avatar
    Join Date
    Apr 2004
    Posts
    882
    It's probably because the enterprise.log file isn't inserting the line breaks you want. You may want to try the dos2unix or unix2dos command to get them inserted and see whether it works when the HTML include points to the updated file.

  3. #3
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Quote Originally Posted by slacker908 View Post
    Hello,

    I configured sysklogd to gather logs from all my Cisco devices, and created a web page to view the logs from any PC on the network. I'm using the following code that I got off the web for doing this (see bottom of post)

    The problem is that the output of this file does not word wrap, and it's very jumbled to view. If I do a "cat syslog" the file views fine, but in the browser there are several entries on each line. Is there any way to format the output? Create some sort of table or border to not allow it to have multiple events on each line? Is there some other app I can use to point to my log file to read it?

    Thanks,

    Scott

    <html>
    <head>
    <title>Enterprise Syslog Log File</title>
    </head>
    <body>
    <center>
    <h2>
    MyCorp Enterprise Syslog Log
    </h2>
    </center>
    [an error occurred while processing this directive]
    <br>
    </body>
    </html>
    Try wrapping your SSI in <pre> tags. There probably aren't any html tags in your included filed so the browser doesn't know how to format the text. White space and line breaks don't matter in html unless you have <pre> tags around the text.

    Code:
    <pre>
    <!--#include file="enterprise.log" -->
    </pre>
    Let us know if that works.
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

  4. #4

    Thumbs up

    Quote Originally Posted by jro View Post
    Try wrapping your SSI in <pre> tags. There probably aren't any html tags in your included filed so the browser doesn't know how to format the text. White space and line breaks don't matter in html unless you have <pre> tags around the text.

    Code:
    <pre>
    <!--#include file="enterprise.log" -->
    </pre>
    Let us know if that works.
    That worked...you are the man, thank you very very much.

  5. #5
    Mentor jro's Avatar
    Join Date
    May 2004
    Location
    Pennsylvania, USA
    Posts
    1,206
    Your very welcome, glad it worked for you
    jro - http://jeff.robbins.ws
    Linux counter#:213782
    GnuPG ID: 406238E7

Similar Threads

  1. How to revert my file modes of /etc file system
    By vesskrishna in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 10-26-2009, 05:24 AM
  2. File Manager File names in all caps?
    By vwgtiturbo in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 07-14-2006, 04:18 AM
  3. File permissions upon creating the file
    By cloverm in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 05-17-2004, 07:48 PM
  4. What is an .asc file?
    By BlueKrystal22 in forum Linux - General Topics
    Replies: 4
    Last Post: 06-25-2003, 07:35 PM
  5. Which file to DL?
    By RedRock in forum Linux Distros
    Replies: 4
    Last Post: 11-12-2002, 09:32 AM

Bookmarks

Posting Permissions

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