Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.181.397 Times

django-logdb for linux 0.9.9

Company: Joeri Bekker
Date Added: November 11, 2013  |  Visits: 443

django-logdb for linux

Report Broken Link
Printer Friendly Version


Product Homepage
Download (36 downloads)



django-logdb has a custom logging handler that writes log entries in a database. It therefore integrates nicely with your existing logging configuration and you can decide what log entries are written to the database.<br /><br />The Django admin site is extended with a graphical view of recent log entries to provide more insight in what is going on. The log messages are grouped by log level or "type of log entry".<br /><br />To minimize database access, aggregation is done via a Django command that you can call periodically (as a cronjob).<br /><br />Installation:<br /><br />The easiest way to install the package is via setuptools:<br /><br />easy_install django-logdb<br /><br />Once installed, update your Django settings.py and add djangologdb to your INSTALLED_APPS:<br /><br />INSTALLED_APPS = (<br /> 'django.contrib.admin',<br /> 'django.contrib.auth',<br /> 'django.contrib.contenttypes',<br /> 'django.contrib.sessions',<br /> ...<br /> 'djangologdb',<br />)<br /><br />In your Django urls.py, include the djangologdb.urls before the admin:<br /><br />urlpatterns = patterns('',<br /> ...<br /> (r'^admin/djangologdb/', include('djangologdb.urls')),<br /> ...<br /> (r'^admin/', include(admin.site.urls)),<br />)<br /><br />Optionally, if you want to log exceptions, add the middleware:<br /><br />MIDDLEWARE_CLASSES = (<br /> 'django.middleware.common.CommonMiddleware',<br /> 'django.contrib.sessions.middleware.SessionMiddleware',<br /> 'django.contrib.auth.middleware.AuthenticationMiddleware',<br /> ...<br /> 'djangologdb.middleware.LoggingMiddleware',<br />)<br /><br />Run python manage.py syncdb to create the database tables.<br /><br />Now, for the actual logging part, you should use the database logging handler. There are two ways to do this: Using only Python code, or, by using a configuration file. Both methods are explained below.<br /><br />To add this handler via Python to, for example, your root logger, you can add the following to your Django settings.py:<br /><br />import logging<br />from djangologdb.handler import DjangoDatabaseHandler, add_handler<br /><br />logging.basicConfig(level=logging.DEBUG)<br />logger = logging.getLogger()<br /><br /># A bug in Django causes the settings to load twice. Using<br /># this handler instead of logging.addHandler works around that.<br />add_handler(logger, DjangoDatabaseHandler())<br /><br />To use this handler via a logging configuration file, simply import this module in your Django settings.py before loading the configuration from a file:<br /><br />from djangologdb import handlers<br />logging.config.fileConfig(...)<br /><br />Then in your logging configuration file, you can add it from the handlers namespace and add it to any logger you want:<br /><br />[handlers]<br />keys=djangologdb<br /><br />[logger_root]<br />level=NOTSET<br />handlers=djangologdb<br /><br />[handler_djangologdb]<br />class=handlers.DjangoDatabaseHandler<br />args=()<br /><br />Configuration:<br /><br />You can set the following settings in your Django settings.py file:<br /><br />LOGDB_RULES<br /><br /> Define rules to create a new log entry when certain conditions are true.<br /><br /> Default:<br /><br /> LOGDB_RULES =<br /> [{<br /> # If 3 logs with level WARNING or higher occur in 5 minutes or<br /> # less, create a new log with level CRITICAL.<br /> 'conditions': {<br /> 'min_level': logging.WARNING,<br /> 'qualname': '',<br /> 'min_times_seen': 3,<br /> 'within_time': datetime.timedelta(0, 5 * 60),<br /> },<br /> 'actions': {<br /> 'level': logging.CRITICAL,<br /> }<br /> }]<br /><br />LOGDB_LEVEL_COLORS<br /><br /> Set colors to use in the graph for level based datasets.<br /><br /> Default:<br /><br /> LOGDB_LEVEL_COLORS =<br /> {<br /> logging.DEBUG: '#c2c7d1',<br /> logging.INFO: '#aad2e9',<br /> logging.WARNING: '#b9a6d7',<br /> logging.ERROR: '#deb7c1',<br /> logging.CRITICAL: '#e9a8ab',<br /> }<br /><br />LOGDB_MEDIA_ROOT<br /><br /> Set the absolute path to the directory of django-logdb media.<br /><br /> Default:<br /><br /> LOGDB_MEDIA_URL = os.path.join(djangologdb.__path__[0], 'media')<br /><br />LOGDB_MEDIA_URL<br /><br /> Set the URL that handles the media served from LOGDB_MEDIA_ROOT. Make sure to add a trailing slash at the end. If settings.DEBUG=True, the media will be served by Django.<br /><br /> Default:<br /><br /> LOGDB_MEDIA_URL = '/admin/djangologdb/media/'<br /><br />Commands:<br /><br />aggregate_logs<br /><br /> Aggregates log entries and triggers any action with matching rules.<br /><br />Usage:<br /> python django-admin.py aggregate-logs<br /><br />Options:<br /> -s, --skip-actions<br /> Do not use the rules to create new logs.<br /> --cleanup=CLEANUP<br /> Specifies the number of days to keep log entries and deletes the rest.<br /><br /><br />#md5=85b9c6812a7df94cf51e78ca688ae3c0

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Configuration Create Database Default Django Django Logdb Djangologdb Entries Handler Import Level Linux Logdb Logdb Linux Logging Media Python Rules Served Settings Settingspy
Users rating: 0/10

License: Freeware Size: 71.68 KB
USER REVIEWS
More Reviews or Write Review


DJANGO-LOGDB FOR LINUX RELATED
Network & Internet  -  django-admin-tools 0.2.0
django-admin-tools is a collection of plugins/extensions for the default Django administration interface, it includes: * a full featured and customizable dashboard, * a customizable menu bar, * tools to make admin theming...
706.56 KB  
Libraries  -  Blocks (formerly Database Objects) 2.2.2
Database Objects it's a Java library containing visual (SWING) and non visual components to easily create database RAD applications. The focus traversal between components is entirely controlled by a special component. PDF reports and Excel...
 
Database Tools  -  Database Test Suite 5.0.1.0
This Database Test Suite aims to create database workload test kits used to simulate heavy user loads for OLTP, Decision Support, and e-commerce database transactions. These test kits can also be used to gather performance results for Linux and other
1.85 MB  
Database Tools  -  Firebird Relational Database 2.0 / 2.1 Beta 1
Firebird is a relational database offering many ANSI SQL-99 features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and...
1.4 MB  
Database Tools  -  PHPLens 1.0
PHPLens allows PHP developers to quickly create database-driven web applications. With PHPLens, web pages can be quickly created to present data as html tables with facilities to create, edit, paginate, search and delete records.
 
Database Tools  -  PHP Booosta! 1.0
PHP Booosta provides you with easy-to-use components to create database driven web applications in PHP without having any clue about what "SQL" is. It also allows you to create quick HTML-Forms and offers several other things.
 
Database Tools  -  PHPLens for Scripts 1.0
PHPLens allows PHP developers to quickly create database-driven web applications. With PHPLens, web pages can be quickly created to present data as html tables with facilities to create, edit, paginate, search and delete records.
2.66 MB  
Programming  -  BuzzSQL 1.3.8
BuzzSQL is a thin layer over Java JDBC that manages automatic configuration of database connection setup, pooling, configuration, logging, and statement handling.
1.61 MB  
Project Management  -  OneCMDB 386
OneCMDB is an open source CMDB, Configuration Management Database. It keeps track of assets, documents, etc. and relations. The CMDB Model can be changed on the fly and networks can be auto-discovered. Integrated with NAGIOS. ITIL compliant.
94.24 MB  
Modules  -  JustOneAttribute 2.0
This Mod will list "Version: *your attribute text*" and set a hidden field for the value, if there is only one version,and will create the default heading and drop-down box if there's more than one attribute.This is just on the product info page....
 
NEW DOWNLOADS IN PROGRAMMING, SPECIALIZED TOOLS
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Specialized Tools  -  SIMRI 2.0
SIMRI: a versatile and interactive Magnetic Resonance Imaging (MRI) simulator.Such a simulator is a command line software written in C that reproduces the physical phenomenas encountered during an MRI acquisition to produce a realistic MRI image.
6.39 MB  
Specialized Tools  -  Java Web Start Plugin for Eclipse 1.2.1
Java Web Start Plugin for Eclipse (WS4E) helps you to deploy your Java application through Java Web Start. With WS4E, Developers with very little knowledge can deploy their applications with just a few clicks. For advanced developers, WS4E is...
204.8 KB  
Specialized Tools  -  TUGGO for Linux 1.0.0
TUGGO is a website management system allowing anyone to easily create their own website without any code knowledge.
942.08 KB  
Specialized Tools  -  Parcels for Linux 1.0
Web documents that look similar often use different HTML tags to achieve their layout effect. These tags often make it difficult for a machine to find text or images of interest. PARCELS is a backend system [Java] designed to...
1.14 MB  
Specialized Tools  -  django-test-extensions 0.10
PyUnit provides a basic set of assertions which can get you started with unit testing python, but it???*a*?s always useful to have more. Django also has a few specific requirements and common patterns when it comes to testing. This set of classes...
20.48 KB