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.
Thanks a lot [mention:9e4ee96fac634b8f91b580e1fb4f7e71:e9ed411860ed4f2ba0265705b8793d05].
a) Now I'm able to find my log files :). I found the the format of the logging.config by extracting OpenEdge.Core.pl (ver 11.7.5) and seems the logging.config.example file is wrong and misleading. Perhaps should be reported for fixing.
b) Thanks for pointing out the examples.