LogServer
A log server for neo-cli with LogPlugin
- save logs from your consensus node into files
- transfer your logs to partner, another LogServer
requisite
install go at least v1.10
use with LogPlugin v1.0.0
installation
configuration
after installation, configure your this application in config.json
{
"name": "ngd",//the name of your node, let partners to recognize you
"cnport": 8080, //the port to receive log from cn-node and partners
"webport": 8081,//the port to serve websocket
"logpath": "./persist",//directory to store the log
"logname": "concensus.log",//log file name
"logfileexpire": 30,//day, how many days you want to store the log
"logfilesplit": 1,//hour, how many hours to split the file
"sendto":[//partners you want to send your log
"http://ngd1.logbackend:8081"
]
}
if you want to send your consensus node logs to partners, set your partners' LogServer url in "sendto"
set your node name to let partners recognize you, you can not use "" and "local", becase local is reserved for your consensus node, LogServer use name to set in Http Header "From" when sending to partner.
"cnport " is for serving cn-node LogPlugin, see LogPlugin
start
cd log-backend && go run main.go