Today, I took some time to browse node.js. Haha, I read an introductory article (http://www.nodebeginner.org/index-zh-cn.html). I feel that I am getting started, but There is a sentence in it that is quite enlightening:
By the way, I saw a good thing log.io, the official explanation is:
Real-time log monitoring, we may think of tail -f under Linux, log.io has roughly the same meaning, but it is much more powerful than tail -f. This thing is also based on C/S architecture.
The following is a practical demonstration:
1. Installation
This thing depends on nodejs. Let’s install nodejs first and refer to the official installation method: (http://nodejs.org/download/)
I am using the mac brew installation method here:
Or use yum:
After that we can use npm to install log.io
After installation, start the server (no configuration required):
Configure the client afterwards
exports.config = {
nodeName: "application_server",
logStreams: {
test: [
"/Users/chenqing/test.log"
]
},
server: {
host: '0.0.0.0',
port: 28777
}
}
Start the client: log.io-harvester
Let’s test it out:
First go to the command line