LogDriver_demo
所属分类:Windows编程
开发工具:Visual C++
文件大小:123KB
下载次数:62
上传日期:2005-11-02 10:24:27
上 传 者:
BenjaminLH
说明: 封装了 记录日志的功能 可重用
模仿Log4j
开发工具 VC
(Packaging, a recorded log function reusable imitate Log4j development tools VC)
文件列表:
LogDriver-codeguru (0, 2002-01-06)
LogDriver-codeguru\codeguru.html (7568, 2002-01-06)
LogDriver-codeguru\inc (0, 2002-01-06)
LogDriver-codeguru\inc\ConsoleLogAppender.h (2652, 2002-01-06)
LogDriver-codeguru\inc\EventLogAppender.h (2744, 2002-01-06)
LogDriver-codeguru\inc\FileLogAppender.h (3099, 2002-01-06)
LogDriver-codeguru\inc\Log.h (3175, 2002-01-06)
LogDriver-codeguru\inc\LogAppender.h (2973, 2002-01-06)
LogDriver-codeguru\inc\Utility.h (2748, 2002-01-06)
LogDriver-codeguru\LogDriver.dsp (5295, 2002-01-06)
LogDriver-codeguru\LogDriver.dsw (541, 2001-11-12)
LogDriver-codeguru\LogDriver.gif (9606, 2002-01-06)
LogDriver-codeguru\Release (0, 2002-01-06)
LogDriver-codeguru\src (0, 2002-01-06)
LogDriver-codeguru\src\ConsoleLogAppender.cpp (2838, 2002-01-06)
LogDriver-codeguru\src\EventLogAppender.cpp (3632, 2002-01-06)
LogDriver-codeguru\src\FileLogAppender.cpp (4446, 2002-01-06)
LogDriver-codeguru\src\Log.cpp (3209, 2002-01-06)
LogDriver-codeguru\src\LogAppender.cpp (4939, 2002-01-06)
LogDriver-codeguru\src\LogDriver.cpp (3146, 2002-01-06)
LogDriver-codeguru\src\Utility.cpp (2973, 2002-01-06)
LogDriver-codeguru\_copyright.txt (1543, 2002-01-06)
LogDriver-codeguru\_todo.txt (2917, 2002-01-06)
LogDriver-codeguru\_welcome.txt (8087, 2002-01-06)
$Log: _readme.txt,v $
Revision 1.5 2002-01-05 13:01:44-06 wsenn
changed name/location and removed todo to it's own file
Revision 1.4 2002-01-05 11:03:20-06 wsenn
fixed copyright year
Revision 1.3 2002-01-05 09:51:11-06 wsenn
added the todo list and final note
Revision 1.2 2001-11-12 20:58:25-06 wsenn
changed example to a tabular format
Revision 1.1 2001-11-11 19:40:10-06 wsenn
added an example and a little bit of explanation
Revision 1.0 2001-11-11 14:16:39-06 wsenn
Initial revision
$Id: _readme.txt,v 1.5 2002-01-05 13:01:44-06 wsenn Exp wsenn $
Copyright (c) 2002 Will Senn
All rights reserved.
The full text of the Copyright and Permission Notice
is at bottom of this document.
========================================================================
LogDriver is an application written specifically to exercise my new
CLog class and it's CLogAppender's. These classes were inspired by the
Apache Log4J classes. However it is not modeled very closely on Apache's
implementation (I took a great number of liberties, I am sure. Although,
I haven't perused the Log4J source, so I am not 100% certain.) Be sure
to read the *Final Note.
Here is the bottom line:
A message with severity x is written to a log appender
with threshold y if x >= y.
severity and threshold values:
debug < info < warn < error < fatal
Example:
+------------------+-------------------+-----------------+
| Message Severity | Logging Threshold | Message Logged? |
|==================|===================|=================|
| debug | warn | no |
|------------------|-------------------|-----------------|
| info | warn | no |
|------------------|-------------------|-----------------|
| warn | warn | yes |
|------------------|-------------------|-----------------|
| error | warn | yes |
|------------------|-------------------|-----------------|
| fatal | warn | yes |
+------------------+-------------------+-----------------+
The CLog Class now has support for the following CLogAppenders:
CConsoleLogAppender
This appender will write formatted log messages to the
active console.
CFileLogAppender
This appender will write formatted log messages to the
file specified at construction or later opened.
CEventLogAppender
This appender will write formatted log messages to the
windows event application log.
Read the _todo.txt document before complaining about features
that are not yet implemented.
*Final Note:
This set of classes is a rough first attempt at providing
a simplistic Log4J like logging capability to the C++
community. The LogDriver.cpp file is exemplary of the
usage of the classes. Comments, positive or constructive,
will be greatly appreciated.
Contact Information:
Will Senn
2219 Lilac Circle
McKinney, TX 75071
wsenn@bigfoot.com
-----------------------------------------------------------------------
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 2002 Will Senn
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, provided that the above
copyright notice(s) and this permission notice appear in all copies of
the Software and that both the above copyright notice(s) and this
permission notice appear in supporting documentation.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
of the copyright holder.
近期下载者:
相关文件:
收藏者: