?????? ??? ???? ??? ??? ???? ??? ????? ???? ?? ? ????? ??????. ? ????? ?? ?? ??, ???? ?? ??, ???? ???? ??, Winston ? Elasticsearch ?? ?? ??? ?? ?? ??? ???? Node.js ??????? ?? ? ????? ?? ??? ?????.
?? ? ???? ??
??? ???????? ??? ???, ?? ? ?? ??? ??? ???? ? ??? ??, ?????? ?? ??? ?? ?????? ?? ?? ??? ?????. ?? ?? ?????? ??? ?? ??? ???? ???? ??? ??? ??? ? ????.
Node.js?? ?? ?? ??
??? ?? ??? ??? ?? ??? ????? ???? ???????? ?? ?? ?????? ? ?????.
?? ?? ??
console.log("Server started on port 3000"); console.warn("This is a warning"); console.error("Error occurred while processing request");
??? ?? ??? ?? ?? ??? ???? ?? ???? ?? ? ??? ???????? ??? ????.
???? ?????
Winston? ?? ?? ??, ??(?? ??) ? ??? ??? ???? ?? ?? Node.js? ?? ????????.
- ??? ??:
npm install winston
- ??? ??
const winston = require("winston"); // Configure logger const logger = winston.createLogger({ level: "info", format: winston.format.combine( winston.format.timestamp(), winston.format.json() ), transports: [ new winston.transports.Console(), new winston.transports.File({ filename: "app.log" }) ] }); // Logging examples logger.info("Server started on port 3000"); logger.error("Database connection failed");
??? ?? ?? ??
?? ??? ???? ?? ?? ???? ?????. ???? ?? ??? ??? ????.
- ??: ?????? ?? ?? ??? ?? ???? ??? ??? ??? ?????.
- ??: ? ?? ???? ?? API? ?? ???? ?? ??
- ??: ?? ?? ?? ??? ?? ???? ?????? ??
- ???: ?? ? ? ?? ?? ??? ??? ?????.
Winston?? ?? ?? ??
logger.level = "debug"; // Sets the minimum log level to debug, capturing all messages.
??????? ???? ?? ???? ???? ?? ?? ??? ?? ?? ??? ???? ?? ?? ????.
???? ?? ???? ??
???? ??? ???? ??? ??? ???? ??? ? ?? ????? ??? ? ????.
??? ????? ??
user_id ?? request_id? ?? ?????? ?? ?? ?? ??? ???? ? ??? ? ? ????.
logger.info("User login successful", { user_id: "12345" }); logger.error("Failed to fetch user data", { user_id: "12345", error: "Database unavailable" });
?? ??? ??? ?? Elasticsearch? ??
Elasticsearch? ?? ??? ?? ?? ? ?? ??? ?? ?????.
- Elasticsearch ? Elasticsearch Transport ??
console.log("Server started on port 3000"); console.warn("This is a warning"); console.error("Error occurred while processing request");
- Elasticsearch ?? ??
npm install winston
? ??? Elasticsearch? ??? ????? Kibana? ???? ??? ?? ?? ? ??? ? ? ????.
Prometheus ? Grafana? ???? ?????? ???? ????
????? CPU ???, ???, ?? ??? ?? ?????? ?? ??? ???? ???? ??????? ???? ? ??? ???.
Node.js? Prometheus ??
- Prometheus ????? ????? ??
const winston = require("winston"); // Configure logger const logger = winston.createLogger({ level: "info", format: winston.format.combine( winston.format.timestamp(), winston.format.json() ), transports: [ new winston.transports.Console(), new winston.transports.File({ filename: "app.log" }) ] }); // Logging examples logger.info("Server started on port 3000"); logger.error("Database connection failed");
- ???? ?? ? ????
logger.level = "debug"; // Sets the minimum log level to debug, capturing all messages.
- ??? ????? ??
logger.info("User login successful", { user_id: "12345" }); logger.error("Failed to fetch user data", { user_id: "12345", error: "Database unavailable" });
Grafana? ??? ???
Grafana? Prometheus ???? ????? ???? ?? ??? ?????. Prometheus? Grafana? ??? ??? ??? ?? ?? ??, ??? ?? ????? ??????.
?? ?? ??: ?????? ?? ? ????
???? ???? ???? ? ??? ????? ??? ????? ???? ??? ???.
- ?? ?? ??: order_id ? user_id? ?? ?????? ??? ???? ??? ?? ? ?? ???? ?????.
- ?? ??: ?? ???? ?? Winston? ???? ?? ?? ? ?????? ?? ?? ?? ?? ??? ?????.
- ?? ?? ????: ??? ???? ?? Grafana? ???? ?? ?? ? ?? ?? ??????? Prometheus? ?????.
- ?? ??: ????? ???? ??? ?????. ?? ?? ?? ??? ???? ???? ????? ??? ????.
? ??? ?????? ??? ?? ???? ??? ????? ??? ??? ???? ??? ? ????.
??
???? ???? ?? ?? ??? ????? Node.js?? ??? ?? ? ????? ???? ?? ??????. Winston, Elasticsearch, Prometheus ? Grafana? ?? ??? ???? ???? ??? ???? ?? ????? ??? ?? ??? ????? ????? ? ????.
? ??? Node.js? ?? ? ????: ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.

JavaScript? ??? ??? ?? ??, ? ? ? ?? ???? ???? ??? ??? ?????. 1. ?? ??? ?? ??? ???? ??? ??? ??? ??? ?? WebAPI? ?????. 2. WebAPI? ??????? ??? ?? ? ? ??? ?? ??? (??? ?? ?? ???? ??)? ????. 3. ??? ??? ?? ??? ?? ??? ?????. ?? ??? ??? ????? ??? ??? ?? ? ???? ?????. 4. ???? ?? (? : Promise. 5. ??? ??? ???? ?? ???? ???? ?? ?? ?? ??? ????? ? ??????.

??? ??? ?? ???? ?? ??? ???? ?? ??? ??? ?? ??? ?? ??? ?????. 1. ??? ?? : ?? ??? ?? ? ? ???? ?? ??? ???? ??? ???? ??????. ?? ??, ??? ?? ? ? ?? ??? ?? ? ?? ??? ??????. 2. ??? ?? : ??? ???? ?? ?? ??? ?? ???? ????? ? ?? ?????? ???? ????? ? ?? ?? ??? true? ??????. 3. ?? ???? ?? ?? ??? ?? ??, ?? ??? ? ?? ???? ?????. 4. DOM ??? ???? ??, ?? ? ??? ? ??? ??? ?? ???? ?? ???? ?????.

JavaScript ???? ? ? ?? ??? ???? ??? ???? ?? ??? ????. 1. ??? ???? ??? ??, ??, ??? ?? ? ??? ??? ?? ? ? ????. 2. ?? ? findIndex? ?? ?? ?? ???? ?? ? ?????. 3. ??? ??? ????? ?? ?? ??? ???? ? ?????. 4. ??? ?? ? ? ??? ?? ??? ?????. 5. ???? ??? ?? ??? ??? ? ?? ?????????. ??? ??? ????? ???? ????? ????.
