Archived

This forum has been archived. Please start a new discussion on GitHub.

IcePy: stdout/stderr not redirected to syslog

Ice 3.4.2, Python 2.7 on CentOS 5.5

Here's the beginning of the Python program:

#!/usr/bin/python2.7
import os, sys, traceback
print "loading"
print >>sys.stderr, "loading"

Here's the app.xml stanza:
<node name="bees0">
<server id="FitsManager0"
exe="/home/philip/hscsw/OBCP/trunk/Exposure/FitsHeaderServer.py"
activation="on-demand"
pwd="/home/philip/hscsw/OBCP/trunk/Exposure">
<adapter name="FitsManager0"
id="FitsManager0"
endpoints="tcp"/>
<property name="Ice.ProgramName" value="FitsManager0"/>
<property name="Ice.UseSyslog" value="1"/>
</server>
</node>

Here's the output of:
srvAdminProp = Ice.PropertiesAdminPrx.checkedCast(srvAdmin, "Properties")
print srvAdminProp.getPropertiesForPrefix('')

{'Ice.Default.CollocationOptimized': '0', 'FitsManager0.Endpoints': 'default', 'Ice.Admin.ServerId': 'FitsManager0', 'Ice.Config': '/var/lib/ice/icegrid/bees0/servers/FitsManager0/config/config', 'Ice.Admin.Endpoints': 'tcp -h 127.0.0.1', 'Ice.ProgramName': 'FitsManager0', 'Ice.UseSyslog': '1', 'Ice.Default.Locator': 'IceGrid/Locator:tcp -h hscobcp-pip -p 4061', 'FitsManager0.AdapterId': 'FitsManager0'}


Is there any other information needed to confirm the bug?

Comments

  • mes
    mes California
    Hi,

    The purpose of the Ice.UseSyslog property is to enable an Ice::Logger implementation that sends its messages to syslog. I tested this in Python and it works as intended.

    Ice does not provide a way to redirect stdout/stderr to syslog.

    Regards,
    Mark