Giter VIP home page Giter VIP logo

logging's Introduction

logging

Install

$ git clone https://github.com/netkiller/logging.git
$ cd logging
$ python3 setup.py sdist
$ python3 setup.py install

cp init.d/ulog /etc/init.d/
chkconfig --add ulog
chkconfig ulog on

Example

$ rlog
Usage: rlog [options] filename

Options:
  -h, --help            show this help message and exit
  -H localhost, --host=localhost
						push log to remote host
  -p 1214, --port=1214  port
  --sleep=0.1           with -s, sleep  for  approximately S  seconds between
						iterations
  -d, --daemon          run as daemon
  -f, --full            Full text
  --stdin               cat file | prog ...

  Homepage: http://netkiller.github.io	Author: Neo <[email protected]>

Send logs

$ rlog /var/log/nginx/access.log
b'192.168.6.20 - - [11/Dec/2014:15:51:24 +0800] "GET /home/about.html HTTP/1.1" 200 7802 "http://192.168.6.2/home/download.epub.html" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"\n'
b'192.168.6.20 - - [11/Dec/2014:15:51:24 +0800] "GET /stylesheet.css HTTP/1.1" 304 0 "http://192.168.6.2/home/about.html" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"\n'

# Send log to 192.168.2.1
$ rlog -H192.168.2.1 -p1214 /var/log/nginx/access.log	

# Full text log to 192.168.2.1
$ rlog -H192.168.2.1 -p1214 -f /var/log/nginx/access.log	

# Daemon mode
$ rlog -H192.168.2.1 -p1214 -d /var/log/nginx/access.log

# Stdin
$ cat /var/log/nginx/access.log | rlog -H 127.0.0.1 --stdin

Logs collection

$ collection 
Usage: collection [options] module

Options:
  -h, --help            show this help message and exit
  -p 1214, --port=1214  port
  -l /tmp/test.log, --logfile=/tmp/test.log
						log file
  --list                show module message
  -d, --daemon          run as daemon

  Homepage: http://netkiller.github.io	Author: Neo <[email protected]>

# show log from port 1214
$ collection -p 1214

# Save log to file from port 1214
$ collection -p 1214 -l /tmp/test.log

Audit log

Audit log tools.

logging's People

Contributors

netkiller avatar cookie1030 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.