
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
infobot-yc-logging-api
Advanced tools
Библиотека для записи логов в сервис Yandex Cloud Logging
Установите пакет через npm:
npm i infobot-yc-logging-api
Для работы с Yandex Cloud Logging потребуются следующие данные:
Информацию о получении данных сервисных аккаунтов вы найдёте в документации.
const LoggerAPI = require("infobot-yc-logging-api");
const YCLogger = new LoggerAPI(
ID_СЕРВИСНОГО_АККАУНТА,
ID_КЛЮЧА_СЕРВИСНОГО_АККАУНТА,
СОДЕРЖИМОЕ_ПРИВАТНОГО_КЛЮЧА);
Получения объекта сессии логирования:
const session = await YCLogger.getLoggerSession();
Отправка записи в сервис:
session.write({
destination: {
log_group_id: ID_ГРУППЫ_ЛОГИРОВАНИЯ
},
resource: {
type: НАЗВАНИЕ_ПРИЛОЖЕНИЯ
},
entries: [
{
timestamp: {seconds: Date.parse(info.timestamp) / 1000, nanos: 0},
level: УРОВЕНЬ_ЛОГИРОВАНИЯ,
message: ТЕКСТ_ЗАПИСИ,
json_payload: JSON_PAYLOAD_В_ФОРМАТЕ_google.protobuf.Struct
}
]
});
FAQs
Library for integration with Yandex Cloud Logging
The npm package infobot-yc-logging-api receives a total of 9 weekly downloads. As such, infobot-yc-logging-api popularity was classified as not popular.
We found that infobot-yc-logging-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.