Add an entry to the log table

@param array keys (osr_consumer_key, ost_token, ocr_consumer_key, oct_token)
@param string received
@param string sent
@param string base_string
@param string notes
@param int (optional) user_id
185282
public function addLog ( $keys, $received, $sent, $base_string, $notes, $user_id = null )
	{
		if (is_null($user_id) && isset($GLOBALS['any_auth']))
		{
			$user_id = $GLOBALS['any_auth']->getUserId();
		}
		parent::addLog($keys, $received, $sent, $base_string, $notes, $user_id);
	}
715392
@Override
  public void addEntry(String logType, LogEntry entry) {
    if (!logTypesToInclude.contains(logType)) {
      return;
    }

    if (!localLogs.containsKey(logType)) {
      List<LogEntry> entries = new ArrayList<>();
      entries.add(entry);
      localLogs.put(logType, entries);
    } else {
      localLogs.get(logType).add(entry);
    }
  }
55605
public function addKeys(array $keys, $unique=false)
    {
        foreach ($keys as $key)
        {
            $this->addKey($key, $unique);
        }
    }
48238
def note_handler
      @_note_handler = NoteHandler.new(keytechkit.base_url, keytechkit.username, keytechkit.password) if @_note_handler.nil?
      @_note_handler
    end
710619
public static TableEntry notExists(@NonNull ArrayView key) {
        return new TableEntry(TableKey.notExists(key), null);
    }
422887
public void addEntries(JsonNode data) {
        for (JsonNode webhookJson : data.get("webhooks")) {
            boolean alreadyAdded = involvedWebhooks.stream()
                    .anyMatch(webhook -> webhook.getId() == webhookJson.get("id").asLong());
            if (!alreadyAdded) {
                involvedWebhooks.add(new WebhookImpl(api, webhookJson));
            }
        }
        for (JsonNode userJson : data.get("users")) {
            boolean alreadyAdded = involvedUsers.stream()
                    .anyMatch(user -> user.getId() == userJson.get("id").asLong());
            if (!alreadyAdded) {
                involvedUsers.add(((DiscordApiImpl) api).getOrCreateUser(userJson));
            }
        }
        for (JsonNode entry : data.get("audit_log_entries")) {
            entries.add(new AuditLogEntryImpl(this, entry));
        }
    }
79796
public void addEntry(String logType, LogEntry entry) {
    if (logTypesToIgnore.contains(logType)) {
      return;
    }

    if (!localLogs.containsKey(logType)) {
      localLogs.put(logType, Lists.newArrayList(entry));
    } else {
      localLogs.get(logType).add(entry);
    }
  }
1292130
def addSenderKeyState(self, id, iteration, chainKey, signatureKey):
        
        self.senderKeyStates.append(SenderKeyState(id, iteration, chainKey, signatureKey))
995233
function _doVoid($oID, $note = '') {
    global $db, $messageStack;

    $new_order_status = (int)MODULE_PAYMENT_AUTHORIZENET_AIM_REFUNDED_ORDER_STATUS_ID;
    if ($new_order_status == 0) $new_order_status = 1;
    $voidNote = strip_tags(zen_db_input($_POST['voidnote'] . $note));
    $voidAuthID = trim(strip_tags(zen_db_input($_POST['voidauthid'])));
    $proceedToVoid = true;
    if (isset($_POST['ordervoid']) && $_POST['ordervoid'] == MODULE_PAYMENT_AUTHORIZENET_AIM_ENTRY_VOID_BUTTON_TEXT) {
      if (isset($_POST['voidconfirm']) && $_POST['voidconfirm'] != 'on') {
        $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_VOID_CONFIRM_ERROR, 'error');
        $proceedToVoid = false;
      }
    }
    if ($voidAuthID == '') {
      $messageStack->add_session(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_TRANS_ID_REQUIRED_ERROR, 'error');
      $proceedToVoid = false;
    }
    // Populate an array that contains all of the data to be sent to gateway
    $submit_data = array('x_type' => 'VOID',
                         'x_trans_id' => trim($voidAuthID) );
    /**
     * Submit void request to Gateway
     */
    if ($proceedToVoid) {
      $response = $this->_sendRequest($submit_data);
      $response_code = $response[0];
      $response_text = $response[3];
      $response_alert = $response_text . ($this->commError == '' ? '' : ' Communications Error - Please notify webmaster.');
      $this->reportable_submit_data['Note'] = $voidNote;
      $this->_debugActions($response);

      if ($response_code != '1' || ($response[0]==1 && $response[2] == 310) ) {
        $messageStack->add_session($response_alert, 'error');
      } else {
        // Success, so save the results
        $sql_data_array = array('orders_id' => (int)$oID,
                                'orders_status_id' => (int)$new_order_status,
                                'date_added' => 'now()',
                                'comments' => 'VOIDED. Trans ID: ' . $response[6] . ' ' . $response[4] . "\n" . $voidNote,
                                'customer_notified' => 0
                             );
        zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
        $db->Execute("update " . TABLE_ORDERS  . "
                      set orders_status = '" . (int)$new_order_status . "'
                      where orders_id = '" . (int)$oID . "'");
        $messageStack->add_session(sprintf(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_VOID_INITIATED, $response[6], $response[4]), 'success');
        return true;
      }
    }
    return false;
  }
986786
public static TableEntry notExists(@NonNull ArrayView key, @NonNull ArrayView value) {
        return new TableEntry(TableKey.notExists(key), value);
    }
326249
function write($level,$text,$context = []){
		if(isset($this->log[$level])){
		
			$log = $this->log[$level];

			$log->addRecord($level,$text,$context);
		}
	}
933044
public static void log(PrintWriter out, RecordTypes recordType, Keys key, 
                  String value){
    value = escapeString(value);
    out.println(recordType.name() + DELIMITER + key + "=\"" + value + "\""
                + DELIMITER + LINE_DELIMITER_CHAR); 
  }
1314711
public void addEntry(PartnerLogData logData) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "addEntry", logData);

        _pltWriteLock.lock();

        try {
            addPartnerEntry(logData);
        } finally {
            _pltWriteLock.unlock();
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "addEntry");
    }
186620
public function traceLog(string $key = null, $message = null)
    {
        if ($this->trace_log_enabled) {
            if (is_array($message) || is_object($message)) {
                $text = print_r($message, true);
            } elseif ($message === null) {
                $text = "[null]";
            } elseif ($message === false) {
                $text = "[false]";
            } elseif ($message === true) {
                $text = "[true]";
            } else {
                $text = $message;
            }
            error_log("=== " . ($key !== null ? "$key: " : '') . $text);
        }

        if ($key === null) {
            if ($this->trace_log_buffer === null) {
                $this->trace_log_buffer = array();
            }
            if (array_key_exists(self::MESSAGES_STACK, $this->trace_log_buffer)) {
                $this->trace_log_buffer[self::MESSAGES_STACK][] = $message;
            } else {
                $this->trace_log_buffer[self::MESSAGES_STACK] = array($message);
            }
        } else {
            $this->trace_log_buffer[$key] = $message;
        }
    }
247784
function add($userName, $password, $salt = null)
    {
        if ($salt !== null) {
            $key = \Thruway\Common\Utils::getDerivedKey($password, $salt);
        } else {
            $key = $password;
        }

        $this->users[$userName] = ["authid" => $userName, "key" => $key, "salt" => $salt];
    }
646515
function routeChat(call) {
  call.on('data', function(note) {
    var key = pointKey(note.getLocation());
    /* For each note sent, respond with all previous notes that correspond to
     * the same point */
    if (route_notes.hasOwnProperty(key)) {
      _.each(route_notes[key], function(note) {
        call.write(note);
      });
    } else {
      route_notes[key] = [];
    }
    // Then add the new note to the list
    route_notes[key].push(note);
  });
  call.on('end', function() {
    call.end();
  });
}
1169216
function addNote($note) {
        if (!$note instanceof Note) {
            $note = new Note($note);
        }

        $this->notes[] = clone $note;

    }