• Resolved DQ87

    (@dq87)


    Hello there!
    Beautiful plugin ?? Just one question…
    How can I exclude the “SimpleCategoriesLogger” from logging in the plugin? Is there a way?

    Greetings Dennis

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author P?r Thernstr?m

    (@eskapism)

    Yes, there is a filter you can use to modify this.

    For example:

    
    // Skip loading of loggers
    add_filter('simple_history/logger/load_logger', function( $load_logger, $oneLoggerFile ) {
    	// Don't load loggers for comments or menus, i.e. don't log changes to comments or to menus
    	if ( in_array( $oneLoggerFile, array( 'SimpleCommentsLogger', 'SimpleMenuLogger', 'SimpleCategoriesLogger' ) ) ) {
    		$load_logger = false;
    	}
    	return $load_logger;
    }, 10, 2);
    
    Thread Starter DQ87

    (@dq87)

    Thanks! Where do I put this code in?

    Thread Starter DQ87

    (@dq87)

    hello?

    Plugin Author P?r Thernstr?m

    (@eskapism)

    Try in your functions.php-file.

    Thread Starter DQ87

    (@dq87)

    that seems to work! thanks! merry christmas! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Excluding the “SimpleCategoriesLogger”?’ is closed to new replies.