MCPcopy Create free account
hub / github.com/AS-AIGC/TranscriptHub / write_to_database

Function write_to_database

apps/backend/logger-writer.js:34–46  ·  view source on GitHub ↗

* @brief Writes log entry to database with metadata

(level, message, data)

Source from the content-addressed store, hash-verified

32 * @brief Writes log entry to database with metadata
33 */
34async function write_to_database(level, message, data) {
35 await log_operation_to_db({
36 route: data.route || '',
37 token: data.token || '',
38 sso_account: data.sso_account || '',
39 ip_address: data.ip_address || '',
40 query_time: data.query_time || '',
41 process_id: data.process_id || '',
42 code: String(level),
43 ref: data.ref,
44 log: message
45 });
46}
47
48module.exports = {
49 write_to_log_file,

Callers 1

loggerFunction · 0.85

Calls 1

log_operation_to_dbFunction · 0.85

Tested by

no test coverage detected