A logging module for Willie [] IRC bot with real-time log viewer.
Willie-
__ __ __
/\ \ /\ \ __ /\ \
\ \ \ __ __ ___ ___\ \ \____ __ _ __ /\_\ __ ___\ \ \/'\
\ \ \ __/\ \/\ \ /' __` __`\ \ '__`\ /'__`\/\`'__\/\ \ /'__`\ /'___\ \ , <
\ \ \L\ \ \ \_\ \/\ \/\ \/\ \ \ \L\ \/\ __/\ \ \/ \ \ \/\ \L\.\_/\ \__/\ \ \\`\
\ \____/\ \____/\ \_\ \_\ \_\ \_,__/\ \____\\ \_\ _\ \ \ \__/.\_\ \____\\ \_\ \_\
\/___/ \/___/ \/_/\/_/\/_/\/___/ \/____/ \/_//\ \_\ \/__/\/_/\/____/ \/_/\/_/
\ \____/
\/___/
Lumberjack will chopping the log for you.
- Real-time log viewer
- Themes (Bootswatch [])
- Widget
- Python
- Redis []
- Willie []
- redis-py []
- bottle.py []
- bottle-redis []
- gevent-socketio []
- arrow []
- YapDi []
sudo apt-get install python python-dev python-pip redis-server \
build-essential libevent-dev
cd ~
git clone https://github.com/marlboromoo/willie-lumberjack.git
cd willie-lumberjack
git submodule init
git submodule update
sudo pip install requirements.txt
cd ~/.willie/
ln -s ~/willie_lumberjack/lumberjack.py ./modules/
cp ~/willie_lumberjack/config/logbot.cfg ./default.cfg
#. start the ircbot
willie -d
#. start the web server
cd ~/willie-lumberjack
python web.py start
- Stop the ircbot & web server.
#. stop the web server
cd ~/.willie-lumberjack
python web.py stop
#. stop the ircbot
willie -q
- Update.
cd ~/willie-lumberjack
git pull
git submodule update
- Start the ircbot & web server.
#. start the web server
cd ~/.willie-lumberjack
python web.py start
#. start the ircbot
willie -d
Full example can find in the /doc [] folder.
[lumberjack] | example | purpose |
---|---|---|
redis_host | localhost | Redis host |
redis_port | 6379 | Redis port |
redis_dbid | 0 | Redis dbid |
channels | #foo,#bar | IRC channels |
log_path | /tmp/lumberjack/ | Log path |
Check the config.py [] to see the full example.
BIND_HOST
: IP Address to listen.BIND_PORT
: TCP port to listen.LOGFILE
: Log pathPIDFILE
: PID file path.
REDIS_HOST
: Redis server address.REDIS_PORT
: Redis server port.REDIS_DBID
: Redis DB id.
LOG_PATH
: Path to the plain text log.
DEFAULT_THEME
: Default theme.WIDGET_THEME
: Default theme for widget.BOOTSWATCH_THEMES
: Themes to enable.
If you want to keep the logs in 30 days only, you can add following line in /etc/crontab.
#. keep log only 1 month
01 01 * * * root find $PATH_TO_IRC_LOGS -ctime +30 | grep -i txt$ | xargs -i rm -f {}
- You tell me
[ []] Travis CI
Timothy.Lee a.k.a MarlboroMoo.
Released under the MIT License.