Fixed audit log message overflow
This commit is contained in:
parent
bf3f11147f
commit
ad44ea6fe0
1 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,7 @@ import ch.ethz.seb.sebserver.gbl.model.user.UserInfo;
|
||||||
import ch.ethz.seb.sebserver.gbl.model.user.UserLogActivityType;
|
import ch.ethz.seb.sebserver.gbl.model.user.UserLogActivityType;
|
||||||
import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile;
|
import ch.ethz.seb.sebserver.gbl.profile.WebServiceProfile;
|
||||||
import ch.ethz.seb.sebserver.gbl.util.Result;
|
import ch.ethz.seb.sebserver.gbl.util.Result;
|
||||||
|
import ch.ethz.seb.sebserver.gbl.util.Utils;
|
||||||
import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.InstitutionRecordDynamicSqlSupport;
|
import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.InstitutionRecordDynamicSqlSupport;
|
||||||
import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.UserActivityLogRecordDynamicSqlSupport;
|
import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.UserActivityLogRecordDynamicSqlSupport;
|
||||||
import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.UserActivityLogRecordMapper;
|
import ch.ethz.seb.sebserver.webservice.datalayer.batis.mapper.UserActivityLogRecordMapper;
|
||||||
|
@ -538,6 +539,10 @@ public class UserActivityLogDAOImpl implements UserActivityLogDAO {
|
||||||
} catch (final JsonProcessingException e) {
|
} catch (final JsonProcessingException e) {
|
||||||
entityAsString = entity.toString();
|
entityAsString = entity.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entityAsString != null && entityAsString.length() > 4000) {
|
||||||
|
return Utils.truncateText(entityAsString, 4000);
|
||||||
|
}
|
||||||
return entityAsString;
|
return entityAsString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue