/**
 * log.js
 * @description apache logに実ページ遷移のない操作を記録する
 *
 */
$(function() {
      /**
       * log_pathとlog_errorをグローバルに定義することで発動
       */
      if ("log_path" in window) {
          $.ajax({
                     type:'GET',
                     url: global.baseUrl + 'logs/cart_log/' + log_path + '/' + (log_error ? 'error' : ''),
                     cache:false,
                     timeout:60000,
                     success:function(res) {
                         return res;
                     },
                     error:function(res) {
                         return res;
                     }
                 });
      }
  });

/**
 * log_touch
 * @description apache log保存用Ajaxアクセス
 * @param String log_path 登録用path
 * @param Boolean log_error エラー時かどうか
 */
function log_touch(log_path, log_error) {
    $.ajax({
               type:'GET',
               url: global.baseUrl + 'logs/cart_log/' + log_path + '/' + (log_error ? 'error' : ''),
               cache:false,
               timeout:60000,
               success:function(res) {
                   return res;
               },
               error:function(res) {
                   return res;
               }
           });
}
