• Resolved nileshpatidar1908

    (@nileshpatidar1908)


    Hello Team,

    I want to update the Formats of a log record using hooks but have not found any hooks to update recode. Let me update you about the file and function.

    File Name: class-datadogformatter.php
    Function Name: format()

    In this function, I want to update and add some extra tags in this array key “ddtags”

    Please let me know which hook I need to use to update the “ddtags” array key value without editing the plugin’s core files.

    In short, I need a hook to update format() function present on class-datadogformatter.php file

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello @nileshpatidar1908 !
    There’s currently no hook to do that – mainly for performance reason.
    Could you just tell me: are the tags you want to add dynamic or static?

    Thread Starter nileshpatidar1908

    (@nileshpatidar1908)

    Hello @pierrelannoy

    The tags should mostly be static, apart from the environment tag.
    Please provide any recommendations on how to implement this without any issue at the time of plugin update?

    Thanks

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello !
    There’s no way to implement that without issue when updating the plugin.

    That’s why I asked you if tags are static (defined while configuring the logger) or dynamic (must be evaluated at runtime). If it’s always static, I will implement it. But for dynamic tags, I will not provide a way to do that (as stated, mainly for performance reason).
    So, if I understand well, the only dynamic tag you have is “environment”… Could you describe me what it is?

    Thanks.

    Thread Starter nileshpatidar1908

    (@nileshpatidar1908)

    Hello @pierrelannoy,

    Thanks for providing a sugettion we will think about it and let you know.

    We have one more thing. I can see that the plugin supports multisite, Can you please let us know how to configure the plugin separately for each subsite in this case?

    Also can you please explain what multisite support means for plugins?

    Thanks

    Thread Starter nileshpatidar1908

    (@nileshpatidar1908)

    Hello @pierrelannoy

    Can you please explain what multisite support means for plugins?
    Please check the above comment as well.

    Thanks

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello!
    Regarding the multisite compatibility, it means : “On WordPress multisite, Network Admins can configure the plugin and have access to all events and traces. Sites Admins have access to the events and traces of their own sites.”.
    Loggers are network-wide (no per site loggers), and access to local events and traces (via the integrated viewer) are allowed on a per site basis.

    Hope it helps…

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘update and add some extra ddtags using hooks’ is closed to new replies.