Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Commit

Permalink
Minor improvements to file lock debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tdmalone committed Jun 26, 2017
1 parent 1584463 commit 88b3ee2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,12 @@ function slackemon_lock_debug( $message, $force_debug = false ) {
return;
}

slackemon_error_log( $message );
// Log a message, including the function that initially caused the lock.
// (We go to the 5th level due to this function, the lock function, the file reading function,
// and the player/battle data wrapping function).
$debug_backtrace = debug_backtrace( null, 5 );
slackemon_error_log( $message . ' (' . $debug_backtrace[4]['function'] . ')' );

}
} // Function slackemon_lock_debug

// The end!

0 comments on commit 88b3ee2

Please sign in to comment.