473,414 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 2032
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(method):
logger = logging.getLogger('mylogger')
def _loggedmethod(self, *args, **kw):
logger.debug('## %s was called ##' % method.func_name)
return method(self, *args, **kw)
return _loggedmethod

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

foo = loggedmethod(foo)

if __name__ == '__main__':
logger = logging.getLogger("mylogger")
logger.addHandler(logging.StreamHandler())
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:ehotel.de/omphalos/Domain:1.0) -- deleted.
omniORB: inputMessage: from giop:tcp:192.168.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 getTransactionCo
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*********@web.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.org --
-- 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
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...
4
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...
3
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...
1
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...
3
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
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
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...
0
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...
0
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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,...
0
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...
0
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...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.