From 3c77703fa4c0605b4e6e67124b225ac1512dbf3c Mon Sep 17 00:00:00 2001 From: Anchor Date: Wed, 10 Dec 2014 09:30:00 -0800 Subject: [PATCH] Fix grammar and translations for section "Introduction to seelog" in 12.1.md --- en/eBook/12.1.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/en/eBook/12.1.md b/en/eBook/12.1.md index 5aec458a..3ae77d07 100644 --- a/en/eBook/12.1.md +++ b/en/eBook/12.1.md @@ -2,14 +2,14 @@ We want to build web applications that can keep track of events which have occurred throughout execution, combining them all into one place for easy access later on, when we inevitably need to perform debugging or optimization tasks. Go provides a simple `log` package which we can use to help us implement simple logging functionality. Logs can be printed using Go's `fmt` package, called inside error handling functions for general error logging. Go's standard package only contains basic functionality for logging, however. There are many third party logging tools that we can use to supplement it if your needs are more sophisticated (tools similar to log4j and log4cpp, if you've ever had to deal with logging in Java or C++). A popular and fully featured, open-source logging tool in Go is the [seelog](https://github.com/cihub/seelog) logging framework. Let's take a look at how we can use `seelog` to perform logging in our Go applications. -## Seelog Introduction +## Introduction to seelog -seelog with Go language of a logging system, it provides some simple function to implement complex log distribution, filtering, and formatting. Has the following main features: +Seelog is a logging framework for Go that provides some simple functionality for implementing logging tasks such as filtering and formatting. Its main features are as follows: -- XML dynamic configuration, you can not recompile the program and dynamic load configuration information +- Dynamic configuration via XML; you can load configuration parameters dynamically without recompiling your program - Supports hot updates, the ability to dynamically change the configuration without the need to restart the application -- Support multi- output stream that can simultaneously output the log to multiple streams, such as a file stream, network flow, etc. -- Support for different log output +- Supports multi-output streams that can simultaneously pipe log output to multiple streams, such as a file stream, network flow, etc. +- Support for different log outputs - Command line output - File Output @@ -17,13 +17,13 @@ seelog with Go language of a logging system, it provides some simple function to - Support log rotate - SMTP Mail -The above is only a partial list of features, seelog is a particularly powerful log processing systems, see the detailed contents of the official wiki. Next, I will briefly describe how to use it in your project: +The above is only a partial list of seelog's features. To fully take advantage of all of seelog's functionality, have a look at its [official wiki](https://github.com/cihub/seelog/wiki) which thoroughly documents what you can do with it. Let's see how we'd use seelog in our projects: -First install seelog +First install seelog: go get -u github.com/cihub/seelog -Then we look at a simple example: +Then let's write a simple example: package main @@ -34,8 +34,7 @@ Then we look at a simple example: log.Info("Hello from Seelog!") } - -When compiled and run if there is a `Hello from seelog`, description seelog logging system has been successfully installed and can be a normal operation. +Compile and run the program. If you see a `Hello from seelog` in your application log, seelog has been successfully installed and is running operating normally. ## Based seelog custom log processing