dd-sdk-flutter icon indicating copy to clipboard operation
dd-sdk-flutter copied to clipboard

Add the option to send logs with other log status levels

Open jgarciapueyo opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. As far as I have found, the log status levels offered by this plugin are restricted to ['debug', 'info', 'warn', 'error']. However, in the documentation of log configuration (https://docs.datadoghq.com/logs/log_configuration/processors/?tab=ui#log-status-remapper), it shows that datadog allows for more log status levels (0-7 if is an integer or other levels it it is a string).

Describe the solution you'd like I think adding more method calls allowing to send logs with other levels (alert, critical, etc.) or, preferably, a method that can be customized with any log status level would be a perfect solution to add more flexibility to the users of the plugin and allow to send logs with status level other than the 4 predefined by the plugin.

Additional context For example, the javascript library @datadog/datadog-api-client to submit logs through the API allows to submit a log with any log status level using the additional properties

jgarciapueyo avatar Sep 09 '22 11:09 jgarciapueyo

Hi @jgarciapueyo,

I'll definitely look into adding all levels in the future. In the meantime, you may actually be able to use the log status remapper anyway, since we support sending attributes with logs. I'm not 100% sure the remapper will overwrite the status, but it might be worth investigating.

fuzzybinary avatar Sep 09 '22 18:09 fuzzybinary

Thanks @fuzzybinary! I'll take a look at the workaround.

jgarciapueyo avatar Sep 13 '22 06:09 jgarciapueyo