socklog

所属分类:Pascal/Delphi编程
开发工具:Delphi
文件大小:11KB
下载次数:26
上传日期:2004-11-11 13:40:17
上 传 者zshshy
说明:  delphi的socket编程
(socket programming)

文件列表:
LogCommon.pas (9236, 2002-06-15)
SockLog.dpr (224, 2002-06-17)
SockLog.res (1724, 2002-06-02)
TestLog.dpr (187, 2002-06-06)
TestLog.res (1724, 2002-06-06)
uLogger.dfm (5704, 2002-06-15)
uLogger.pas (7080, 2002-06-15)
uTest.dfm (1920, 2002-06-08)
uTest.pas (2636, 2002-06-15)

Logger Socket ------------- Version : 1.1 Author : Dirk Claessens Purpose ------- Many applications somehow maintain log files, especially applications that run continuously for 365 days/year. If you have many of those applications, you will need to inspect many logfiles, all physically located on many systems in the network. Wouldn't it be nice to have =one= central log for all of those applications? Read on, as that's what socklog is intended for. Each application that wishes to use SockLog, simply opens a socket connection to it, and can from then on send it's log messages to SockLog. SockLog will gather this messages into a memory buffer, and periodically dump the buffer into a file for later inspection. In this version, the log files are organised into "hour" files, that is, each log file contains the messages logged in a particular hour of the day. Depending on your needs, you can easily change this to "day" files, or even - if your log throughput is gigantic - in "minute" files. Message Format -------------- To assure proper operation, SockLog expects incoming messages to be prepended with a special message header. ============================================================== **Note that SockLog will reject messages in any other format** ============================================================== Simply do: uses LogCommon; MyLogMessage := LogCommon.FormatLogMessage( 'MY_APP', 'my log test' ); to format a message in the expected format. Even better, do: LogCommon.SendLogMessage( YourSocket, 'MY_APP', 'my log test'); which will take care of the formatting and the sending; Testing ------- A testapp is included ( TestLog.dpr ). Simply fill in the host name where LogSock.exe runs, and do some testing. ( note that you can test this from the same machine, and that you can run TestLog.exe multiple times on one machine ) Viewing the logs ---------------- I have included a simple viewing tool, that you can use to review the log files. You can also search for text. I hope you will find SockLog useful! Regards - Dirk

近期下载者

相关文件


收藏者