basic jython question

G

Gerard Flanagan

Hello all

I have a 'logger' module which is essentially just a facade over the
'logging' standard module. Can this be called from jython, and how is
this acheived? This is a colleague's question but I have no knowledge
of jython or java, and I can't install them at present in order to
figure it out.

It appears that the CPython logging builtin is not implemented in
Jython, is this correct?

The source for CPython's logging says that it should work with Python
1.5.2, so given everything from Python2.4/Lib/Logging and my own
facade module, is there any way to get it working from a jython
script? I presume they just can't be dropped in to a "site-packages"
directory? I'm completely in the dark, any help?

Gerard
 
R

Richard Brodie

I have a 'logger' module which is essentially just a facade over the
'logging' standard module. Can this be called from jython, and how is
this acheived? This is a colleague's question but I have no knowledge
of jython or java, and I can't install them at present in order to
figure it out.

Since the CPython module is heavily influenced by the native Java logging
framework (and/or log4j), I would have thought that it would be easier
to create a Jython wrapper for those.
 
G

Gerard Flanagan

Since the CPython module is heavily influenced by the native Java logging
framework (and/or log4j), I would have thought that it would be easier
to create a Jython wrapper for those.

Ok, thanks. I'll suggest that.

Gerard
 
V

Vinay Sajip

Agreed, but if you copy the logging folder from the CPython Lib folder
to the jython lib folder, it should work (except for use of other
modules which wouldn't perhaps be available under Java, such as
syslog, win32 etc.) - so files, console streams etc. should be OK.

Clearly, a facade over an existing system such as log4j or
java.util.logging would have the potential to perform better.

Regards,

Vinay Sajip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top