0
Votes
Undo
  1. Eduardo G.
  2. PowerBuilder
  3. Monday, 16 December 2019 10:28 AM UTC

Hello,

I don't know if it's silly what I'm going to ask ... Can LOG4J be implemented with PowerBuilder, are there examples if someone has done it?

Thank you.

Michael Kramer Accepted Answer Pending Moderation
  1. Monday, 16 December 2019 11:24 AM UTC
  2. PowerBuilder
  3. # 1

Hi Eduardo, it's certainly POSSIBLE to implement LOG4J using PowerScript. However, I expect what will have best impact is create NVO in PowerScript as a wrapper for LOG4J.

LOG4J is Java technology so my question is what part of your PowerBuilder accessing a SQL based database do you want to log using LOG4J? Have you considered alternatives?

And: No - I haven't written a LOG4J wrapper myself. 

HTH /Michael 

Comment
  1. Kevin Ridley
  2. Monday, 16 December 2019 20:23 PM UTC
Yes, the J in Log4J literally stands for Java. You could write a wrapper for Log4Net (the .NET version) but why bother? Just write an nvo that does logging and use that wherever you need it. That's what I've done in the past, it's not hard.
  1. Helpful 1
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 16 December 2019 12:56 PM UTC
  2. PowerBuilder
  3. # 2

Hi Eduardo,

there is also a similar project for .NET: https://logging.apache.org/log4net/

Maybe it is easier for you to write a wrapper as Michael suggested using this technology. PB 2019 R2 makes it possible to use .NET assemblies in classic PowerBuilder applications.

But I have not used Log4Net myself.

HTH,

René

Comment
  1. Armeen Mazda @Appeon
  2. Monday, 16 December 2019 18:43 PM UTC


As Rene mentioned, you can natively call .NET assemblies from PowerScript in PowerBuilder 2019 R2. This opens up a whole world of .NET libraries/functionalities you can enrich your application with.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.