Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { createClientLogger } from "@azure/logger";
/**
* The @azure/logger configuration for this package.
* This will output logs using the `azure:event-hubs` namespace prefix.
*/
export const logger = createClientLogger("event-hubs");
/**
* Logs the error's stack trace to "verbose" if a stack trace is available.
* @param error Error containing a stack trace.
* @ignore
*/
export function logErrorStackTrace(error: any) {
if (error && error.stack) {
logger.verbose(error.stack);
}
}
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { createClientLogger } from "@azure/logger";
/**
* The @azure/logger configuration for this package.
*/
export const logger = createClientLogger("storage-file-share");
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { createClientLogger } from "@azure/logger";
/**
* The @azure/logger configuration for this package.
* This will output logs using the `azure:event-hubs` namespace prefix.
*/
export const logger = createClientLogger("core-amqp");
/**
* Logs the error's stack trace to "verbose" if a stack trace is available.
* @param error Error containing a stack trace.
* @ignore
*/
export function logErrorStackTrace(error: any) {
if (error && error.stack) {
logger.verbose(error.stack);
}
}
const { AbortController } = require("@azure/abort-controller");
const {
AnonymousCredential,
ShareServiceClient,
newPipeline
} = require("@azure/storage-file-share");
// Load the .env file if it exists
require("dotenv").config();
// Enabling logging may help uncover useful information about failures.
// In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`.
// Alternatively, logging can be enabled at runtime by calling `setLogLevel("info");`
// `setLogLevel` can be imported from the `@azure/logger` package
const { setLogLevel } = require("@azure/logger");
setLogLevel("info");
async function main() {
// Fill in following settings before running this sample
const account = process.env.ACCOUNT_NAME || "";
const accountSas = process.env.ACCOUNT_SAS || "";
const localFilePath = "README.md";
const pipeline = newPipeline(new AnonymousCredential(), {
// httpClient: MyHTTPClient, // A customized HTTP client implementing IHttpClient interface
retryOptions: { maxTries: 4 }, // Retry options
userAgentOptions: { userAgentPrefix: "AdvancedSample V1.0.0" }, // Customized telemetry string
keepAliveOptions: {
// Keep alive is enabled by default, disable keep alive by setting false
enable: false
}
});
*/
import * as fs from "fs";
import { AbortController } from "@azure/abort-controller";
import { AnonymousCredential, BlobServiceClient, newPipeline } from "@azure/storage-blob";
// Load the .env file if it exists
import * as dotenv from "dotenv";
dotenv.config({ path: "../.env" });
// Enabling logging may help uncover useful information about failures.
// In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`.
// Alternatively, logging can be enabled at runtime by calling `setLogLevel("info");`
// `setLogLevel` can be imported from the `@azure/logger` package
import { setLogLevel } from "@azure/logger";
setLogLevel("info");
export async function main() {
// Fill in following settings before running this sample
const account = process.env.ACCOUNT_NAME || "";
const accountSas = process.env.ACCOUNT_SAS || "";
const localFilePath = "README.md";
const pipeline = newPipeline(new AnonymousCredential(), {
// httpClient: MyHTTPClient, // A customized HTTP client implementing IHttpClient interface
retryOptions: { maxTries: 4 }, // Retry options
userAgentOptions: { userAgentPrefix: "AdvancedSample V1.0.0" }, // Customized telemetry string
keepAliveOptions: {
// Keep alive is enabled by default, disable keep alive by setting false
enable: false
}
});
*/
const fs = require("fs");
const { AbortController } = require("@azure/abort-controller");
const { AnonymousCredential, BlobServiceClient, newPipeline } = require("@azure/storage-blob");
// Load the .env file if it exists
require("dotenv").config();
// Enabling logging may help uncover useful information about failures.
// In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`.
// Alternatively, logging can be enabled at runtime by calling `setLogLevel("info");`
// `setLogLevel` can be imported from the `@azure/logger` package
const { setLogLevel } = require("@azure/logger");
setLogLevel("info");
async function main() {
// Fill in following settings before running this sample
const account = process.env.ACCOUNT_NAME || "";
const accountSas = process.env.ACCOUNT_SAS || "";
const localFilePath = "README.md";
const pipeline = newPipeline(new AnonymousCredential(), {
// httpClient: MyHTTPClient, // A customized HTTP client implementing IHttpClient interface
retryOptions: { maxTries: 4 }, // Retry options
userAgentOptions: { userAgentPrefix: "AdvancedSample V1.0.0" }, // Customized telemetry string
keepAliveOptions: {
// Keep alive is enabled by default, disable keep alive by setting false
enable: false
}
});