Giter Site home page Giter Site logo

logbot's Introduction

LogBot 0.4.2

Written by Chris Oliver [email protected]

Many thanks to Filip Slagter for his contributions.

Usage

LogBot requires Python 2. It is NOT compatible with Python 3. Configuration is done inside logbot.py.

python logbot.py

Example logs at https://raw.github.com/excid3/logbot/master/example_logs/2011-10-22.html

Channels with localised time

LogBot now also supports having localised time on a per channel basis using the pytz library, allowing you to have the logs of specific channels use different timezones. Installing pytz should be as simple as running easy_install --upgrade pytz, see http://pytz.sourceforge.net/#installation for details. Don't worry, if you don't have pytz installed, LogBot will continue to show the logs timestamped with your system's localtime as it used to.

Next you can create a simple text file at ~/.logbot-channel_locations.conf (or wherever CHANNEL_LOCATIONS_FILE in logbot.py points to). On each line you can now specify a channel name, and the timezone location of which it should use the timezone offset, separated by a space. Example:

#excid3 America/Chicago
#netherlands Europe/Amsterdam
#aloha US/Hawaii
#space UTC

Any channel not specified in this file will use the default timezone as specified in DEFAULT_TIMEZONE, which defaults to 'UTC'.

If you want to see a list of all possible timezone location names you can use, run:

python -c 'import pytz;print pytz.all_timezones'

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.