Seaslog
Introduction
The Seaslog is an effective,fast,stable log extension for PHP.
The log journal,which is usually the operate record of the system, software and the application record. Through the analysis of the log,it can facilitate users to understand the operation of the system, software and the application situation. If your application log is rich enough, it can also analyze the previous use’s operation behavior,type, regional distribution or other more information. The application log also points the multiple levels at the same time, you can easily get the application analysis of health status, timely find problems and quick positioning, and solve the problem, remedy the loss.
The error_log, syslog function which built in PHP is powerful and excellent performance, but due to various defects (error_log have no error level, no fixed format, syslog regardless of module, and mix with system log ), reducing a lot of flexibility , and can't meet the application requirements.
The good news is that there are a number of third-party log class library established to make up for the defects, such as log4php, plog, monolog (of course, there are many applications in the project development of the log class).
So is there a log of libraries meet the following requirements:
- Modules, classification
- Simple configuration (preferably without configuration)
- Clear log format and easy understanding
- Simple application and well performance
What is provided at present:
- In the PHP project, record the log specification and repidly.
- Configure the default log directory and module
- Specified log directory and capture current configuration
- Preliminary analysis of the early warning framework
- Efficient log buffer and convenient buffer debug
- Follow the PSR-3 log interface specification
- Automatically record error information
- Automatically record abnormal information
- Support Connect the TCP port, send with RFC5424
- Support Connect the UDP port, send with RFC5424
- Support RequestId differentiated requests
- Support for log template customizations
Read More » SeasLog Document at Github.
- Installing/Configuring
- Predefined Constants
- Examples
- Seaslog Functions
- seaslog_get_author — Get SeasLog author.
- seaslog_get_version — Get SeasLog version.
- SeasLog — The SeasLog class
- SeasLog::alert — Record alert log information
- SeasLog::analyzerCount — Get log count by level, log_path and key_word
- SeasLog::analyzerDetail — Get log detail by level, log_path, key_word, start, limit, order
- SeasLog::closeLoggerStream — Manually release stream flow from logger
- SeasLog::__construct — Description
- SeasLog::critical — Record critical log information
- SeasLog::debug — Record debug log information
- SeasLog::__destruct — Description
- SeasLog::emergency — Record emergency log information
- SeasLog::error — Record error log information
- SeasLog::flushBuffer — Flush logs buffer, dump to appender file, or send to remote api with tcp/udp
- SeasLog::getBasePath — Get SeasLog base path.
- SeasLog::getBuffer — Get the logs buffer in memory as array
- SeasLog::getBufferEnabled — Determin if buffer enabled
- SeasLog::getDatetimeFormat — Get SeasLog datetime format style
- SeasLog::getLastLogger — Get SeasLog last logger path
- SeasLog::getRequestID — Get SeasLog request_id differentiated requests
- SeasLog::getRequestVariable — Get SeasLog request variable
- SeasLog::info — Record info log information
- SeasLog::log — The Common Record Log Function
- SeasLog::notice — Record notice log information
- SeasLog::setBasePath — Set SeasLog base path
- SeasLog::setDatetimeFormat — Set SeasLog datetime format style
- SeasLog::setLogger — Set SeasLog logger name
- SeasLog::setRequestID — Set SeasLog request_id differentiated requests
- SeasLog::setRequestVariable — Manually set SeasLog request variable
- SeasLog::warning — Record warning log information