Thread: Custom Log Data
View Single Post
  #1  
Old 09-10-2009, 07:47 AM
darkoth darkoth is offline
Registered User
 
Join Date: Jun 2007
Posts: 29
Post Custom Log Data

I'm curious how I would go about creating a log that does this:

I have the Log file name as: %H.log which is the hostname. I'm happy with that.

I have it start a log upon connect and append to the file. That way if I ever need to go back and see what I did for the host, I simply bring up the file. Now in order for me to see what and when it was I am using custom log data

Upon Connect: ============================================= NEW SESSION ON %M/%D @ %h:%m ===================================================

Upon Disconnect: ============================================= SESSION END ON %M/%D @ %h:%m ===================================================


However it kind of jumbles up the log. I am wondering how to make the Upon Connect and Disconnect lines span more than 1 line and also enter a carriage return.

So I'd see something like this:

Code:
==============================================================================================================================
============================================= NEW SESSION ON 09/10 @ 09:31 ===================================================
==============================================================================================================================

Last login: Thu Sep 10 09:20:14 2009 from glory
Sun Microsystems Inc.   SunOS 5.9       Generic May 2002
# ls
Gadgets/        scripts/    test
# exit

==============================================================================================================================
============================================= SESSION END ON 09/10 @ 09:31 ===================================================
==============================================================================================================================
So there is a carriage return right after the first custom log stuff is sent and then again before the session end lines and after to break it up some.