{"id":49748,"library":"winston-azure-blob","title":"winston-azure-blob","description":"A Winston transport for logging to Azure Blob Storage. Current stable version is 1.5.0, with no recent releases (last update 2019). It supports multiple authentication methods (account key, SAS token, connection string), file extension configuration, log rotation, and TypeScript types out of the box. Unlike other Azure log transports, it uses the modern @azure/storage-blob SDK and integrates directly with winston 3. It requires async and winston >=3 as peer dependencies.","status":"maintenance","version":"1.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/agmoss/winston-azure-blob","tags":["javascript","winston","transport","azure","blob","log","typescript"],"install":[{"cmd":"npm install winston-azure-blob","lang":"bash","label":"npm"},{"cmd":"yarn add winston-azure-blob","lang":"bash","label":"yarn"},{"cmd":"pnpm add winston-azure-blob","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for async operations (e.g., queue processing)","package":"async","optional":true},{"reason":"peer dependency - the transport is built for winston >=3.0.0","package":"winston","optional":false}],"imports":[{"note":"Named export, not default. CommonJS require() works but no default export.","wrong":"const winstonAzureBlob = require('winston-azure-blob')","symbol":"winstonAzureBlob","correct":"import { winstonAzureBlob } from 'winston-azure-blob'"},{"note":"Utility object containing log file extensions (e.g., extensions.LOG for '.log').","wrong":"","symbol":"extensions","correct":"import { extensions } from 'winston-azure-blob'"},{"note":"TypeScript type, should be imported with `import type` if using isolatedModules or ts-transformer.","wrong":"import { WinstonAzureBlobOptions } from 'winston-azure-blob'","symbol":"WinstonAzureBlobOptions","correct":"import type { WinstonAzureBlobOptions } from 'winston-azure-blob'"}],"quickstart":{"code":"import * as winston from 'winston';\nimport { winstonAzureBlob, extensions } from 'winston-azure-blob';\n\nconst logger = winston.createLogger({\n  format: winston.format.combine(\n    winston.format.timestamp(),\n    winston.format.json()\n  ),\n  transports: [\n    winstonAzureBlob({\n      account: {\n        name: process.env.AZURE_STORAGE_ACCOUNT ?? '',\n        key: process.env.AZURE_STORAGE_KEY ?? ''\n      },\n      blobName: 'myapp.log',\n      containerName: 'logs',\n      extension: extensions.LOG,\n      level: 'info'\n    })\n  ]\n});\n\nlogger.warn('Test log entry');","lang":"typescript","description":"Initializes a Winston logger with Azure Blob transport using account name and key authentication."},"warnings":[{"fix":"Create the Azure Blob container using Azure Portal, CLI, or SDK before using the transport.","message":"The transport does not automatically create the container. You must create the container manually in Azure before logging.","severity":"gotcha","affected_versions":"all"},{"fix":"Set bufferLogSize to a positive integer (e.g., 10) to reduce HTTP calls.","message":"The `bufferLogSize` option defaults to -1, meaning no buffering. Each log call immediately writes to Azure Blob Storage which can be slow. Set a positive value to batch logs.","severity":"gotcha","affected_versions":"all"},{"fix":"If you need a different version of `@azure/storage-blob`, use a separate instance or check compatibility.","message":"The transport uses `@azure/storage-blob` version 12.x, which has breaking changes from earlier versions. Ensure your project does not use an incompatible version of `@azure/storage-blob` as a direct dependency.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `extensions.LOG` for '.log', or provide a custom string like '.txt'.","message":"The `extensions` object exports `LOG` as string '.log'. It is not a direct file extension but just a string; you can pass any string as extension.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.5.0':18 '2019':25 '3':65,71 'account':31 'async':68 'authent':29 'azur':3,11,51,78 'azure/storage-blob':58 'blob':4,12,79 'box':48 'configur':39 'connect':35 'current':14 'depend':74 'direct':62 'extens':38 'file':37 'integr':61 'javascript':75 'key':32 'last':23 'log':9,40,52,80 'method':30 'modern':57 'multipl':28 'peer':73 'recent':21 'releas':22 'requir':67 'rotat':41 'sas':33 'sdk':59 'stabl':15 'storag':13 'string':36 'support':27 'token':34 'transport':7,53,77 'type':44 'typescript':43,81 'unlik':49 'updat':24 'use':55 'version':16 'winston':2,6,64,70,76 'winston-azure-blob':1","created_at":"2026-06-07T17:03:24.586870+00:00","updated_at":"2026-06-07T17:03:24.586870+00:00","problems":[{"fix":"Create the container via Azure portal, CLI, or SDK before running the logger.","cause":"The specified container name does not exist in your Azure storage account.","error":"Error: Container does not exist."},{"fix":"Provide a valid account object with name/key, host/sasToken, or connectionString.","cause":"Missing or incorrect authentication configuration. The transformer expects account credentials.","error":"TypeError: Cannot read property 'createBlobService' of undefined"},{"fix":"Check the storage account name; ensure it is correct and accessible.","cause":"The storage account name is invalid or DNS resolution fails.","error":"Error: getaddrinfo ENOTFOUND <storageaccount>.blob.core.windows.net"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/agmoss/winston-azure-blob#readme","github":"https://github.com/agmoss/winston-azure-blob","docs":null,"changelog":null,"pypi":null,"npm":"winston-azure-blob","openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}