Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/cjolowicz/autolog
- Owner: cjolowicz
- Created: 2013-08-02T10:42:30.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-03T16:51:05.000Z (over 11 years ago)
- Last Synced: 2024-10-15T20:41:14.528Z (2 months ago)
- Language: Python
- Size: 125 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Automatic logging of calls.
Simple usage:
import autolog
@autolog.logged
def add(a, b):
return a + bclass 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.aif __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.