• Hi,

    how do I log my information so it’s displayed like below on the dashboard?

    Updated option “_transient_timeout_settings_errors”
    New value 1558970145
    Old value 1558970144
    Settings page general

    My logs just show one line that opens the more detailed view, but the format above is better.

    I checked the classes for the two rows and this one contains

    SimpleHistoryLogitem SimpleHistoryLogitem–loglevel-info SimpleHistoryLogitem–logger-SimpleOptionsLogger SimpleHistoryLogitem–initiator-wp_user

    So it seems the format I want is related to ‘SimpleOptionsLogger’.

    The one I currently have contains these classes related to ‘SimpleLogger’:

    SimpleHistoryLogitem SimpleHistoryLogitem–loglevel-info SimpleHistoryLogitem–logger-SimpleLogger SimpleHistoryLogitem–initiator-wp_user

    So it seems to be a distinction between ‘SimpleOptionsLogger’ and ‘SimpleLogger’. It seems I want to log it as ‘SimpleOptionsLogger. How do I do that?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author eskapism

    (@eskapism)

    Is this when you log things yourself using the Simple History API? Could you post an example on what you are logging so I can understand want you want better?

    Thread Starter wbcorus

    (@wbcorus)

    Yes, that’s when I use the API.

    I am using this logging method:

    SimpleLogger()->info(
    ‘option “‘ . $option_name . ‘” was edited by ‘ . $logged_in_user->user_login .’.’,
    array(
    ‘option name’ => $option_name,
    ‘old value’ => $old_value,
    ‘new value’ => $new_value,
    )
    );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Log display format’ is closed to new replies.