Package Exports
- @datadog/datadog-api-client-logs
- @datadog/datadog-api-client-logs/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@datadog/datadog-api-client-logs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@datadog/datadog-api-client-logs
Description
Search your logs and send them to your Datadog platform over HTTP. See the Log Management page for more information.
Installation
# NPM
npm install @datadog/datadog-api-client-logs
# Yarn
yarn add @datadog/datadog-api-client-logsGetting Started
import { createConfiguration } from "@datadog/datadog-api-client";
import { LogsApiV2 } from "@datadog/datadog-api-client-logs";
import { v2 } from "@datadog/datadog-api-client-logs";
const configuration = createConfiguration();
const apiInstance = new LogsApiV2(configuration);
const params = {/* parameters */};
apiInstance.submitLog(params).then((data: v2.any) => {
console.log("API called successfully. Returned data: " + JSON.stringify(data));
}).catch((error) => {
console.error("Error calling API: " + error);
});