Home Bug Reports

IcePy: stdout/stderr not redirected to syslog

pjtaitpjtait Member Philip TaitOrganization: Subaru TelescopeProject: Fibre-Fed Multi-ObjectSpectrograph;HyperSuprimeCam ✭✭
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

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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
Sign In or Register to comment.