Mod_console json-log-format settings

Hi All,

I have been struggling with customizing JSON format for console output.
According to freeswitch/src/mod/loggers/mod_console/mod_console.c at master · signalwire/freeswitch · GitHub, the config should be read from json-log-format setting

  <json-log-format>
      <format field="ident" name="mycustomident"/>
      <format field="testField" name="testField"/>
      <format field="short-message" name="test short-message"/>
      <config name="custom-field-prefix" value="{Core-UUID:123}"/>
      <config name="timestamp-divisor" value="100000"/>
  </json-log-format>

Is it possible to override ‘level’ element to populated a string level (DEBUG, INFO etc…) instead of the integer level ?
What is the expected syntax for custom-field-prefix input to populate some extra headers ?

Thank you in advance.

Looks like it would need to be patched to use switch_log_level2str to fill in that data properly, a PR would be accepted if you wished to add it.

/b

OK. Thank you

As for the my second question:
What is the expected syntax for custom-field-prefix input to populate some extra headers ?

I could not find any documentation/examples for this field.

You would have to review the source code for the module, as we didn’t write that one.

/b

It looks like a commit come from SW (FS-11870 [core, mod_graylog2, mod_console] Added switch_log_node_to_j… · signalwire/freeswitch@b06c7b0 · GitHub)

Was it commit via a PR? If yes, is it possible to see the original author?

Thank you in advance.