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

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

Serving Software Downloads in 976 Categories, Downloaded 30.123.467 Times

django-logdb for linux 0.9.9

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

django-logdb for linux

Report Broken Link
Printer Friendly Version


Product Homepage
Download (18 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
DJANGO-LOGDB FOR LINUX RELATED
Network & Internet  -  django-wakawaka 0.1.1
A super simple wiki app written in Python using the Django Framwork django-wakawka is a super simple wiki system written in Python and designed for the Django framework. A sample installation is available under:
40.96 KB  
Network & Internet  -  django-nani 0.0.2
django-nani provides a high level API to maintain multilingual content in your database using the Django ORM.
30.72 KB  
Network & Internet  -  django-reversetag 0.3.1
django-reversetag is an enhanced replacement for Django's builtin URL template tag. Installation To use reversetag in your Django project it needs to be accessible by your Python installation. The easy way:
10.24 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...
 
Project Management  -  Keas Project Manager 1.0
The Keas Project Manager is a Java application to record progress on projects, such as new features, changes, to do items, and description. Requires to run: a Java JRE, MySQL JDBC Driver, see Readme for more info. Features:
993.28 KB  
Code Management Tools  -  tangible architect professional edition 4.0
Create Database Applications in record time! tangible architect generates a full business object implementation - including data access code - from C# interface definitions or UML ! Generated business objects realize the data access with...
14.46 MB  
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  -  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  
NEW DOWNLOADS IN PROGRAMMING, SPECIALIZED TOOLS
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
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  -  Jigs Persistent Objects (JPO) 0.2
Welcome to the Java Persistent Objects (JPO) project site. This site is dedicated to Java developers attempting to find a simple solution to object persistence in a relational database (or object-relational mapping). Get the latest...
1.4 MB  
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