阅读log4cxx的文档(1)

Short introduction to Apache log4cxx

Introduction

Apache log4cxx is a logging framework for C++ patterned after Apache log4j. Apache log4cxx uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR. Apache log4cxx is licensed under the Apache License, an open source license certified by the Open Source Initiative.

Apache log4cxx 是一个继Apache log4j之的用于C++的日志框架。Apache log4cxx使用Apache Portable Runtime作为大部分的平台相关代码,可以用于任何支持APR的平台。Apache log4cxx 基于Apache License, 一个Open Source Initiave认证的开源协议。

Almost every large application includes its own logging or tracing API. Inserting log statements into code is a low-tech method for debugging it. It may also be the only way because debuggers are not always available or applicable. This is usually the case for multithreaded applications and distributed applications at large.

几乎每个大型应用都包含其自己的logging或者tracing API。在代码中插入日志语句是一种低技术的debgging方法。他也可能是唯一的方法,因为debuggers并不总是好用。一般来说,经常用于多线程应用和分布式应用。

Experience indicates that logging is an important component of the development cycle. It offeres several advantages. It provides precise contextabout a run of the application. Once inserted into the code, the generation of logging output requires no human intervention. Moreover, log output can be saved in persistent medium to be studied at a later time. In addition to its use in the development cycle, a sufficiently rich logging package can also be viewed as an auditing tool.

经验表明,logging是开发周期中的重要组成部分。他有以下几个优势:他提供了一个简洁的上下文。一旦插入代码,日志的生成就要求不依赖人的干涉。Moreover, 日志输出可以被永久存储以供之后研究。另外,在开发周期中,有效的丰富的logging package也可以作为审计工具。

Logging does have its drawbacks. It can slow down an application. If too verbose, it can cause scrolling blindness. To alleviate these concerns, log4cxx is designed to be reliable, fast and extensible. Since logging is rarely the main focus of an application, the log4cxx API strives to be simple to understand and to use.

日志确实存在着一些缺陷。他使应用慢下来。如果太冗余,他可以导致屏幕闪动(scrolling blindness)。 为了缓解这些问题,log4cxx设计的可靠、快速、可扩展。因为logging并非应用的主要关注点,log4cxx的API尽量的易于理解和应用。

你可能感兴趣的:(阅读log4cxx的文档(1))