CodeSite Logging System 讓開發(fā)者深入了解他們的代碼如何執(zhí)行,這使得他們能夠更快定位和解決問(wèn)題。CodeSite 的日志類使開發(fā)者能夠捕獲代碼執(zhí)行時(shí)的所有信息,之后發(fā)送該信息到實(shí)時(shí)顯示或日志文件。其次,日志樣式、實(shí)時(shí)日志和文件日志都能夠在本地或遠(yuǎn)程執(zhí)行(通過(guò) TCP、UDP 或 HTTP)。
The CodeSite Logging System gives developers deeper insight into how their code is executing, which enables them to locate problems more quickly and ensure their application is running correctly. CodeSite's logging classes let developers capture all kinds of information while their code executes and then send that information to a live display or to a log file. Furthermore, both styles of logging, live logging and file logging, can be performed locally or remotely (via TCP, UDP, or HTTP).
CodeSite 也可以解決傳統(tǒng)日志/跟蹤解決方案的一些缺點(diǎn)。CodeSite 同樣給開發(fā)者更多的管理日志信息的靈活性,例如多程序(或同一程序的多實(shí)例)發(fā)送日志信息到同一日志文件。另外,專為分析 CodeSite 日志信息設(shè)計(jì)的CodeSite viewers為分析者提供廣泛的、易用的工具。
CodeSite 日志系統(tǒng)有三個(gè)核心組件:
-
The CodeSite Logging Classes
-
The CodeSite Dispatcher
-
The CodeSite Viewers
The CodeSite Logging Classes
開發(fā)者使用的主要日志類是 T|CodeSiteLogger. (TCodeSiteLogger in VCL|VCL.NET, CodeSiteLogger in FCL.NET.)
The CodeSite Dispatcher
T|CodeSiteLogger 的主要日志方法名為 Send,因?yàn)樗鼫?zhǔn)確地描述了記錄日志信息時(shí)的動(dòng)作。特別地,T|CodeSiteLogger 實(shí)例發(fā)送日志信息到 CodeSite Dispatcher 程序,該程序在后臺(tái)運(yùn)行,負(fù)責(zé)分派 CodeSite 日志信息到目的地。
The CodeSite Viewers
CodeSite 日志系統(tǒng)有兩個(gè)查看器:CodeSite Live Viewer 和 CodeSite File Viewer。開發(fā)者將經(jīng)常使用 CodeSite Live Viewer,它在從 CodeSite Dispatcher 收到新的日志信息時(shí)會(huì)立即刷新。因此,實(shí)時(shí)日志需要運(yùn)行 Live Viewer。

CodeSite also addresses several shortcomings with traditional logging/tracing solutions. CodeSite also gives developers more flexibility in managing their logging information such as enabling multiple applications (or multiple instances of the same application) to send logging information to the same log file. In addition, the CodeSite viewers, which are designed specifically for analyzing CodeSite logging messages, provide extensive, easy-to-use tools for analysis.
There are three core components to the CodeSite Logging System:
- The CodeSite Logging Classes
- The CodeSite Dispatcher
- The CodeSite Viewers
The CodeSite Logging Classes
The primary logging class that developers use is T|CodeSiteLogger. (TCodeSiteLogger in VCL|VCL.NET, CodeSiteLogger in FCL.NET.)
The CodeSite Dispatcher
The primary logging method in T|CodeSiteLogger is named Send because it more accurately describes what happens to the information being logged. In particular, T|CodeSiteLogger instances send logging information to the CodeSite Dispatcher application, which runs in the background and is responsible for dispatching CodeSite logging messages to their final destination.
The CodeSite Viewers
The CodeSite Logging System comes with two viewers: the CodeSite Live Viewer and the CodeSite File Viewer. Developers will most often use the CodeSite Live Viewer, which is updated immediately as new CodeSite logging messages are received from the CodeSite Dispatcher. As a result, the Live Viewer is required for live logging.
