Changeset 33:8efa7a7802d4 in mailjam


Ignore:
Timestamp:
May 24, 2012, 7:25:07 PM (13 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Added a new configuration parameter to the xmlrpc_server section of
mailman.conf, access_log, that sets the path to the log file where
incoming requests will be logged (web server style)

Enabled requests logging in the call to SimpleXMLRPCServer

Set current version to 0.1.1, as we have everything we wanted for 0.1.0
plus some bug fixes.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • conf/mailjam.conf

    r16 r33  
    1010ssl_crt = /usr/local/etc/mailjam/ssl/mailjam.crt
    1111logfile = /var/log/mailjam/xmlrpc_server.log
     12accesslog = /var/log/mailjam/access.log
    1213
    1314[storage]
  • mailjam/__init__.py

    r29 r33  
    1111"""
    1212
    13 __version__ = '0.1.0'
    14 
     13__version__ = '0.1.1'
    1514
    1615from mailjam.models import Member, MailingList
  • mailjam/daemon.py

    r31 r33  
    235235            self.server = SimpleXMLRPCServer((self.address, self.port),
    236236                                             allow_none=True,
    237                                              logRequests=False)
     237                                             logRequests=True)
    238238            self.server.register_introspection_functions()
    239239        return True
  • mailjam/tests/mailjam.conf

    r16 r33  
    1212ssl_crt = /usr/local/etc/mailjam/ssl/mailjam.crt
    1313logfile = /tmp/mailjam-tests/xmlrpc_server.log
     14accesslog = /var/log/mailjam/access.log
    1415
    1516[storage]
  • setup.py

    r30 r33  
    22from distutils.core import setup
    33
     4# Yes, I'm ommiting windoze...
     5BSDs = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFlyBSD']
     6linux = ['Linux']
     7osx = ['Darwin']
     8
    49def proper_etc_path():
    5     # Yes, I'm ommiting windoze...
    6     BSDs = ['FreeBSD', 'OpenBSD', 'NetBSD', 'DragonFlyBSD']
    7     linux = ['Linux']
    8     osx = ['Darwin']
     10    """
     11    Try to set the proper path for configuration files, depending
     12    on the operating system.
     13
     14    FIXME: I'm not sure this would work fine, as this will be executed
     15    when running python setup.py sdist, not when installing from the
     16    source package.
     17    """
    918    os_name = os.uname()[0]
    1019    if os_name in BSDs:
     
    1221    if os_name in linux or os_name in osx:
    1322        return '/etc/'   
     23    return ''
     24
     25def proper_rc_path():
     26    """
     27    Similar to proper_etc_path(), returns the path where startup scripts
     28    should be placed
     29    """
     30    os_name = os.uname()[0]
     31    etc_path = proper_etc_path()
     32    if os_name in 'BSDs':
     33        return etc_path+'rc.d'
     34    if os_name in linux:
     35        return etc_path+'init.d'
     36    if os_name in osx:
     37        # FIXME: not sure about where startup scripts should be placed in
     38        # "stock" osx (no macports, no homebrew, etc)
     39        return etc_path
     40    return ''
    1441
    1542setup(
    1643    name='mailjam',
    17     version='0.1.0',
     44    version='0.1.1',
    1845    author='Francisco de Borja Lopez Rio',
    1946    author_email='borja@codigo23.net',
    20     packages=['mailjam'],
     47    packages=['mailjam'],   
    2148    url='https://bitbucket.org/codigo23/mailjam',
    2249    license='BSD licence, see LICENSE',
     
    2653    data_files=[(proper_etc_path()+'mailjam', ['conf/mailjam.conf',
    2754                                               'conf/mailjam-mta.conf',
    28                                                'conf/mailjam-cli.conf']),
    29                 ]
     55                                               'conf/mailjam-cli.conf']),
     56                (proper_rc_path(), ['bin/rc.d/mailjam'])]
    3057)
Note: See TracChangeset for help on using the changeset viewer.