Open zalddeve opened 1 month ago
Hi, thanks for raising this issue.
In the upcoming release of the SDK, I have added the Winston logging framework to all of the clients except for the gRPC one, to allow more flexibility for users.
I could additionally add it to the gRPC client. Would that work for your usecase?
Hi @jwulf,
I've checked your getLogger() implementation in the 8.6
branch.
Perhaps adding a universal logger interface to the Camunda8ClientConfiguration
would be a bit more convenient for a wider audience (e.g. those using Pino or something else). In this case anyone can create a wrapper for their logging implementation.
But I agree with you, configuring the logger this way has advantages in many cases. For our use case it's a good fit as we already use Winston for logging.
Could you add this to the gRPC client as well? Thank you very much!
@zalddeve - could you consume an ESM module version of the SDK in your code?
Although we plan to use ESM modules in our packages in the future, unfortunately we haven't had a chance to migrate them yet, so if possible I prefer the CommonJS one.
The Camunda 8 JavaScript SDK lacks the ability to pass a custom logger to the ZeebeGrpcClient instance.
SDK Component
Zeebe
(The same problem probably affects other modules as well.)
Expected Behavior
In the Zeebe Node.js client it is possible to pass a
ZBCustomLogger
to the client in theZBClientOptions
object, so we can add custom logic to the logger. For example,It would be nice if I could also change the output format in the Camunda SDK.
Current Behavior
Currently we can only choose between the
ZBJsonLogger
andZBSimpleLogger
implementations.camunda/camunda-8-js-sdk/src/zeebe/zb/ZeebeGrpcClient.ts#L125C1-L131C59
Context (Environment)
In our system there are strict requirements for the log message format. To replace the deprecated Zeebe client library with the new SDK, we need the ability to define the shape and extend the content of the output message.
Am I missing something and is this already possible or do you plan to implement it in the near future?
@camunda8/sdk - v8.6.13