Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cjolowicz/autolog

Automatic logging of calls.
https://github.com/cjolowicz/autolog

Last synced: about 1 month ago
JSON representation

Automatic logging of calls.

Awesome Lists containing this project

README

        

Automatic logging of calls.

Simple usage:

import autolog

@autolog.logged
def add(a, b):
return a + b

class Adder(object):
__metaclass__ = autolog.autolog
def __init__(self, a):
self.a = a
def add(self, b):
self.a += b
return self
def get(self):
return self.a

if __name__ == '__main__':
print add(2, 2)
print Adder(2).add(2).get()

Copyright (c) 2007 Claudio Jolowicz
This module is free software, and you may redistribute it and/or modify
it under the same terms as Python itself, so long as this copyright message
and disclaimer are retained in their original form.

IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.