node-tail
Web tail
- display last part of a file. This is a io-redirect of the OS native spawn implementation of the GNU tool tail
. It provides an express server to wrap an .io socket. SSL/TLS, authentication, and custom CSS handlers can be used.
Install
npm install -g shadowbq-node-tail
Usage
Create your own private key and certificate for the server, read more.
The server will attempt to use TLS/SSL if cert and key are made available. Alternatively, you can use --skip_tls
to use http.
Indicate your private key and certificate paths with the command parameters --cert
and --key
.
Usage: node-tail [options] file Options: -h, --help output usage information -V, --version output the version number -n, --lines <lines> output the last NUM lines, instead of the last 10 --retry keep trying to open a file
Example:
node-tail -p 4000 --cert cert.pem --key key.pem ~/file.log
Open in browser: https://localhost:4000/
Log display modes
There are two log display modes: scrollBottom
and scrollTop
. Default mode is scrollBottom
.
scrollBottom
will scroll the document to the bottom automatically when tail receives new input data. Tail data will be accumulated in the document.
scrollTop
will set new tail input data to the document from the top.
Extra
Basic user authentication is provided with the parameters --user
and --pass
.
Login form will appear after accessing the server.
Provide your custom secret string to sign the cookies with parameter --secret
.
node-tail -p 4000 --cert cert.pem --key key.pem --user hello --pass world --secret helloworld ~/file.log