ts-logger-tools
Version:
`ts-logger-tools` 是一个基于 TypeScript 的日志工具包,旨在为 Node.js 应用程序提供强大的日志记录和管理功能。它支持多种日志类型,包括访问日志、应用日志,并且可以与 MongoDB 集成,用于日志的存储和查询。
118 lines (117 loc) • 2.83 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const accessLogsIndex = {
max_text_len: 2048,
log_reduce_white_list: [],
log_reduce_black_list: [],
line: {
chn: false,
caseSensitive: false,
token: [",", ".", "\r", "\n"],
},
keys: {
traceId: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "traceId",
type: "text",
doc_value: true,
},
timestamp: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "timestamp",
type: "long",
doc_value: true,
},
ipAddress: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "ipAddress",
type: "text",
doc_value: true,
},
userId: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "userId",
type: "text",
doc_value: true,
},
},
index_all: false,
max_depth: 5,
json_keys: {},
};
const applicationLogsIndex = {
max_text_len: 2048,
log_reduce_white_list: [],
log_reduce_black_list: [],
line: {
chn: false,
caseSensitive: false,
token: [",", ".", "\r", "\n"],
},
keys: {
traceId: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "traceId",
type: "text",
doc_value: true,
},
timestamp: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "timestamp",
type: "long",
doc_value: true,
},
userId: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "userId",
type: "text",
doc_value: true,
},
spanId: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "spanId",
type: "text",
doc_value: true,
},
parentSpanId: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "parentSpanId",
type: "text",
doc_value: true,
},
eventType: {
chn: false,
caseSensitive: false,
token: ["|"],
alias: "eventType",
type: "text",
doc_value: true,
},
},
index_all: false,
max_depth: 5,
json_keys: {},
};
const SLSIndexJson = {
accessLogs: accessLogsIndex,
applicationLogs: applicationLogsIndex,
};
exports.default = SLSIndexJson;