Published by
Dec 31, 2012 (last update: Apr 8, 2013)

log4z v1.0.0

Score: 3.9/5 (42 votes)
*****

intro

Log4z is an open source C++ lightweight log library.
It provides in a C++ application log and trace debug function.
Using log4z can be very easy and convenient to debug log or track for conveying information to the screen, the log file

open source site:
https://github.com/zsummer/log4z


The advantages of log4z

1. A very wide range of MIT open source license can unrestricted use in personal, educational and commercial cases
2. log4z very lightweight. Using C++ and API system write only a header file and a CPP source files, very simple and easy to use
3. suitable for cross platform (windows or Linux, 32 or 64bit) multithreading logging output occasions
4. to provide a complete log priority control, and the procedure can be adjusted in any position.
5. through a configuration file or call interface increased with the configuration of different log recorder.
6. screen output according to priority to different log color display, file output information and neat enough, logging interface fast and convenient.
7. excellent performance, a small memory footprint
8. Interface clear and simple, a skilled programmer just visit the log4z.h interface can grasp the log system.


update logs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * UPDATES
 *
 * VERSION 0.1.0 <DATE: 2010.10.4>
 * 	create the first project.  
 * 	It support put log to screen and files, 
 * 	support log level, support one day one log file.
 * 	support multiple thread, multiple operating system.
 * 
 * VERSION .... <DATE: ...>
 * 	...
 * 
 * VERSION 0.9.0 <DATE: 2012.12.24>
 * 	support config files.
 * 	support color text in screen.
 * 	support multiple logger.
 * 
 * VERSION 1.0.0 <DATE: 2012.12.29>
 * 	support comments in the config file.
 * 	add a advanced demo in the ./project
 * 	fix some details.
 */


Quick User Manual


1.	include log4z.h
2.	using namespace 
using namespace zsummer::log4z;
3.	add a logger.  if skip that only one main logger.
ILog4zManager::GetInstance()->AddLogger(1,"", "AddLogger", LOG_DEBUG);
4.	start log4z. 
ILog4zManager::GetInstance()->Start();
5.	fast log record micro: LOGD LOGI LOGE ... It's record to main logger, and the level is LOG DEBUG, LOG INFO ...  example:
LOGD("this is a LOG_DEBUG level's log, " << " ^_^ " );
6.	stop and close.  Log4z will auto stop and close at the process dea.
//ILog4zManager::GetInstance()->Stop()

compile


in VS  join the .h and .cpp
in linux,  need append -lpthread. example:
g++ -lpthread -o test   main.cpp   ../log4z.cpp


//add the log4z v1.0.1

1
2
3
4
5
 * VERSION 1.0.1 <DATE: 2013.01.01>
 * 	the source code haven't any change.
 *	fix some Comments in the log4z
 *	add some comments in the test projects.
 *	delete some needless code in the 'fast_test' demo projects, it's so simple.


Attachments: [log4z_v1.0.0.zip] [log4z_v1.0.1.zip]