Edgewall Software

Ticket #7214 (new defect)

Opened 4 months ago

OS X 10.5.2 logging defaulting to non-existent log device

Reported by: cjm182@… Owned by: cmlenz
Priority: normal Milestone:
Component: web frontend/mod_python Version: 0.10.4
Severity: normal Keywords: os x logging
Cc:

Description

python2.5/site-packages/trac/log.py

It seems to be defaulting to "syslog" for the logging 'type' under OS X 10.5.2, and then complaining when it can't find /dev/log (which doesn't exist under 10.5.2).

Temp workaround, change

hdlr = logging.handlers.SysLogHandler?('/dev/log')

to

hdlr = logging.StreamHandler?(sys.stderr)

Apache log:

Traceback (most recent call last):
...
python2.5/site-packages/trac/web/modpython_frontend.py", line 87, in handler
    gateway.run(dispatch_request)
python2.5/site-packages/trac/web/wsgi.py", line 87, in run
    response = application(self.environ, self._start_response)
python2.5/site-packages/trac/web/main.py", line 391, in dispatch_request
    env = _open_environment(env_path, run_once=run_once)
python2.5/site-packages/trac/web/main.py", line 58, in _open_environment
    env_cache[env_path] = open_environment(env_path)
python2.5/site-packages/trac/env.py", line 462, in open_environment
    env = Environment(env_path)
python2.5/site-packages/trac/env.py", line 139, in __init__
    self.setup_log()
python2.5/site-packages/trac/env.py", line 297, in setup_log
    format=format)
python2.5/site-packages/trac/log.py", line 33, in logger_factory
    hdlr = logging.handlers.SysLogHandler('/dev/log')
python2.5/logging/handlers.py", line 594, in __init__
    self._connect_unixsocket(address)
python2.5/logging/handlers.py", line 609, in _connect_unixsocket
    self.socket.connect(address)
error: (2, 'No such file or directory')

Attachments

Add/Change #7214 (OS X 10.5.2 logging defaulting to non-existent log device)

Author



Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will change. Next status will be 'new'
The owner will change to anonymous. Next status will be 'assigned'
 
Note: See TracTickets for help on using tickets.