https://github.com/shuai132/socketlog
A log review tool using tcp socket, with thread safe, send queue, and multi reviewer support.
https://github.com/shuai132/socketlog
logger socket socketlog tcp-socket
Last synced: 11 months ago
JSON representation
A log review tool using tcp socket, with thread safe, send queue, and multi reviewer support.
- Host: GitHub
- URL: https://github.com/shuai132/socketlog
- Owner: shuai132
- Created: 2018-04-14T11:33:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-08T20:06:40.000Z (over 6 years ago)
- Last Synced: 2025-02-15T01:44:03.014Z (about 1 year ago)
- Topics: logger, socket, socketlog, tcp-socket
- Language: C++
- Homepage:
- Size: 21.5 KB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SocketLog
[](https://www.travis-ci.org/shuai132/SocketLog)
A log review tool using tcp socket, with thread safe, send queue, and multi reviewer support.
It can be used in most platform include android/ios, and only C++11 are required.
## Usage:
```cpp
SocketLog::getInstance()->post("Hello World!");
```
### There are also some examples show how to use it:
First, you should build my examples:
```bash
mkdir build && cd build
cmake ..
make
```
Second, run a simple example:
```bash
./examples/loopsender
```
or more complicated:
```bash
./examples/benchmark
```
Finally, just open any tcp tools(eg:nc) to see what happen:
```bash
nc localhost 6666
```
## Notice:
default port is 6666, and will try open bigger port automatic on bind failed。