473,830 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

logging in omniORB for python

Hello newsgroup,

I work with omniORB for python and I what to log the calls, does anyone in
this group know how I can do this?
I use the command to initialize the ORB
ORB = CORBA.ORB_init( sys.argv + ["-ORBtraceLevel", "40"], CORBA.ORB_ID)
but I dont get a log file or a message in pythonwin output display about
anything.
Does anyone know, were the log data is? And how I can store it in a file?
By the way I ask also the omniORB mailing list, but here are the python
experts.

--

Mit freundlichen Grüßen / best regards
Birgit Rahm
Jul 18 '05 #1
3 2077
f
Birgit Rahm wrote:
Hello newsgroup,


Hello Birgit,

I haven't found any way to do logging in a standard way.

The solution i've implemented is to decorate each method you want to log
the call, using the logging module (included in python since 2.3)

For example :

import logging

def loggedmethod(me thod):
logger = logging.getLogg er('mylogger')
def _loggedmethod(s elf, *args, **kw):
logger.debug('# # %s was called ##' % method.func_nam e)
return method(self, *args, **kw)
return _loggedmethod

# imagine A is your corba object
class A:
def foo(self):
return 'foo'

foo = loggedmethod(fo o)

if __name__ == '__main__':
logger = logging.getLogg er("mylogger")
logger.addHandl er(logging.Stre amHandler())
logger.setLevel (logging.DEBUG)
a = A()
print a.foo()


when running :

bash-2.05b$ python plop.py
## foo was called ##
foo

Jul 18 '05 #2
> Does anyone know, were the log data is? And how I can store it in a file?
By the way I ask also the omniORB mailing list, but here are the python
experts.


it gets written to stdout - and then looks like this:

omniORB: ObjRef(IDL:ehot el.de/omphalos/Domain:1.0) -- deleted.
omniORB: inputMessage: from giop:tcp:192.16 8.1.3:33465 76 bytes
omniORB:
4749 4f50 0102 0100 4000 0000 1400 0000 GIOP....@...... .
0300 0000 0000 0000 0e00 0000 fe81 18c0 ............... .
4100 0016 9800 0000 0002 0000 1600 0000 A.............. .
6765 7454 7261 6e73 6163 7469 6f6e 436f getTransactionC o
6e74 6578 7400 4c3a 0000 0000 ntext.L:....

So check out what happens to you stdout.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #3

In article <cp************ *@news.t-online.com>,
Diez B. Roggisch <de*********@we b.de> wrote:
Does anyone know, were the log data is? And how I can store it in a file?
By the way I ask also the omniORB mailing list, but here are the python
experts.


it gets written to stdout - and then looks like this:


To avoid any confusion, it actually gets written to stderr, not
stdout.

Cheers,

Duncan.

--
-- Duncan Grisby --
-- du****@grisby.o rg --
-- http://www.grisby.org --
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1604
by: Duncan Grisby | last post by:
omniORB version 4.0.2 and omniORBpy 2.2 are now available. omniORB is a robust, high performance CORBA ORB for C++. omniORBpy is a version for Python. They are freely available under the terms of the GNU LGPL. These are mainly bug fix releases. Highlights of the new releases include: - Bug fixes.
4
1958
by: Duncan Grisby | last post by:
omniORB 4.0.3 and omniORBpy 2.3 are now available. They are bug fix releases. Many thanks to all the people who have contributed bug fixes and features. omniORB is a robust, high performance CORBA implementation for C++. omniORBpy is a version for Python. They are open source, available under the terms of the GNU LGPL. As always, the releases can be downloaded from SourceForge in source and Windows binary formats:
3
1648
by: denginere | last post by:
I have a situation where I am embedding python in c++ and calling omniorb within python. c++ -> python -> c++ -> python The python is called using the following // Import the module/script pTmpModule = PyImport_Import(pName); PyObject_CallObject(pFunc, pArgs);
1
2299
by: Melissa Wallis | last post by:
I have a class with 5 callbacks. Two of the callbacks work fine but the others don't. The main difference is that the callbacks that don't work are composed of a sequence of structs. I noticed a comment about this same problem on the web but no solution was noted. What makes the callbacks with the sequences so different? It seems that when one of the callbacks with a sequence is called it just hangs. I am talking to a TAO orb from...
3
3917
by: gerald.maher | last post by:
Hi, I am trying to excuate the follwong code: I get the following error: Here is my Lib path:
0
1229
by: gerald.maher | last post by:
Hi, I just want to execute a script that used omniORB, omniORBpy Python, Here are the version that I Tried, is this correct ? omniORBpy 2.5 omniORB 4.0.5 Python 2.4.1 The script is below:
2
1850
by: Attila Rajmund Nohl | last post by:
Hello! I'm using python 2.3.5 on Linux with omniORB 2.6. I'm trying to create an object that shall listen on an event channel, but the registration doesn't work. My code is: class EventListener(CosEventComm.PushConsumer): def __init__(self): pass
0
1875
by: robert | last post by:
As more and more python packages are starting to use the bloomy (Java-ish) 'logging' module in a mood of responsibility and as I am not overly happy with the current "thickener" style of usage, I want to put this comment and a alternative most simple default framework for discussion. Maybe there are more Python users which like to see that imported (managed) logging issue more down-to-earth and flexible ? ... Vinay Sajip wrote: >...
0
1098
by: Duncan Grisby | last post by:
I am pleased to announce that omniORB 4.1.1 and omniORBpy 3.1 are now available. omniORB is a robust, high performance CORBA implementation for C++; omniORBpy is a version for Python. You can download them in source and Windows binary forms from SourceForge: http://sourceforge.net/project/showfiles.php?group_id=51138&package_id=44914&release_id=544978...
0
9642
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10770
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10481
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10524
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5616
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4409
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.