Is your feature request related to a problem? Please describe.
The core api offers TRITONSERVER_ServerOptionsSetLogFile to configure logging to a file. However, there doesn't appear to be a way to inject an arbitrary log callback. This makes it difficult to reroute triton's internal logging to some other sort of log consumer. Adding the ability to set an arbitrary logging callback would make it easy to do so.
Describe the solution you'd like
Offer TRITONSERVER_ServerOptionsSetLogCallback which takes a function pointer and userp, then invokes the provided callback with the log metadata and message, along with the userp, so that the implementation can decide how to log.
Describe alternatives you've considered
Creating a UNIX domain socket bound into the file system and setting that as the ServerOptionsSetLogFile, then having a background thread consume it. However, I would lose access to the log metadata like the log level.
Is your feature request related to a problem? Please describe.
The core api offers
TRITONSERVER_ServerOptionsSetLogFileto configure logging to a file. However, there doesn't appear to be a way to inject an arbitrary log callback. This makes it difficult to reroute triton's internal logging to some other sort of log consumer. Adding the ability to set an arbitrary logging callback would make it easy to do so.Describe the solution you'd like
Offer
TRITONSERVER_ServerOptionsSetLogCallbackwhich takes a function pointer and userp, then invokes the provided callback with the log metadata and message, along with the userp, so that the implementation can decide how to log.Describe alternatives you've considered
Creating a UNIX domain socket bound into the file system and setting that as the
ServerOptionsSetLogFile, then having a background thread consume it. However, I would lose access to the log metadata like the log level.