Merge branch 'MDL-36670' of git://github.com/jleyva/moodle

This commit is contained in:
Marina Glancy 2014-05-14 16:34:52 +08:00
commit 363c49f4c8

View File

@ -185,6 +185,11 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
// database so that it doesn't cause a DB error. Log a warning so that
// developers can avoid doing things which are likely to cause this on a
// routine basis.
if (\core_text::strlen($action) > 40) {
$action = \core_text::substr($action, 0, 37) . '...';
debugging('Warning: logged very long action', DEBUG_DEVELOPER);
}
if (!empty($info) && \core_text::strlen($info) > 255) {
$info = \core_text::substr($info, 0, 252) . '...';
debugging('Warning: logged very long info', DEBUG_DEVELOPER);