[Progress Communities] [Progress OpenEdge ABL] Forum Post: How to use OpenEdge.Logging component?

  • Thread starter Thread starter Akshay Guleria
  • Start date Start date
Status
Not open for further replies.
A

Akshay Guleria

Guest
a) I'm trying to figure out the usage of OpenEdge.Logging component using very basic test. For the test I have place the logging.config file in a dir which is in propath and created a simple class but the log file is not created on the disk. Can someone point out what am I doing wrong here? OS: Mint Linux, Progress Version: 11.7.5, Code executor: Progress Editor 1. logging.config file { "DEFAULT_LOGGER": "OpenEdge", "logger": { "OpenEdge": { "logLevel": "ERROR", "filters": [ "LOG_MANAGER_FORMAT", { "filterName": "LOG_MANAGER_WRITER", "fileName": "/tmp/OpenEdge.log", "appendTo": true } ] }, "TestLogging": { "logLevel": "ERROR", "filters": [ "LOG_MANAGER_FORMAT", { "filterName": "LOG_MANAGER_WRITER", "fileName": "/tmp/TestLogging.log", "appendTo": true } ] } } } 2. TestLogging.cls using OpenEdge.Logging.ILogWriter. using OpenEdge.Logging.LoggerBuilder. class TestLogging: define variable logger as ILogWriter no-undo. constructor TestLogging(): MESSAGE SEARCH("logging.config"). logger = LoggerBuilder:GetLogger(GET-CLASS(TestLogging)). logger:Info("Customer record found"). logger:Warn("CUSTOMER-MESSAGES", "Customer record missing"). end. end class. b) Eventually I want to produce logs using logging framework/component in JSON format readable by LogStash, so it would be nice it someone can also point out to a reference implementation. We are simply using ABL client and not PASOE, BPM etc.

Continue reading...
 
Status
Not open for further replies.
Back
Top