//#import $owl_user_update_log:services/modelService.jsx

var UserLogUtil = (function () {
    var f = {
        addUserLog: function (logType, userId, before_value, after_value, operatorUserId, operatorUserName, remark, ip, user_agent) {
            try {
                var jLog = {};
                jLog.logType = logType;
                jLog.user_id = userId;
                jLog.before_value = before_value;
                jLog.after_value = after_value;
                jLog.uid = operatorUserId;
                jLog.uname = operatorUserName;
                jLog.remark = remark;
                jLog.ip = ip;
                jLog.ua = user_agent;

                owl_user_update_logService.add(jLog);
            } catch (e) {
                $.log("UserLogUtil.jsx...error...logType=" + logType + "...userId=" + userId + "...operatorUserId=" + operatorUserId);
                $.log("UserLogUtil.jsx...error=" + e);
            }
        }
    };
    return f;

})();
