Azure / azure-storage-python

Microsoft Azure Storage Library for Python
https://azure-storage.readthedocs.io
MIT License
338 stars 240 forks source link

How can I remove the error output? #645

Closed DEADSEC-SECURITY closed 3 years ago

DEADSEC-SECURITY commented 4 years ago

Which service(blob, file, queue) does this issue concern?

I'm using azure.storage.file

Which version of the SDK was used? Please provide the output of pip freeze.

azure.storage.file==2.1.0

What problem was encountered?

Is there a way to remove the output from the DirectoryNotEmpty error? I made a way to handle this error and I would like to remove its output so it doesn't show.

The output I would like to remove: Client-Request-ID=0210a318-1540-11ea-b30c-74e5f9368f17 Retry policy did not allow for a retry: Server-Timestamp=Mon, 02 Dec 2019 20:12:04 GMT, Server-Request-ID=06b43dd9-601a-0058-584c-a907c7000000, HTTP status code=409, Exception=The specified directory is not empty. ErrorCode: DirectoryNotEmpty<?xml version="1.0" encoding="utf-8"?><Error><Code>DirectoryNotEmpty</Code><Message>The specified directory is not empty.RequestId:06b43dd9-601a-0058-584c-a907c7000000Time:2019-12-02T20:12:04.6902303Z</Message></Error>.

Have you found a mitigation/solution?

xiafu-msft commented 4 years ago

Hi @DEADSEC-SECURITY

Thanks for reaching out! I don't think you could disable logging the info only for this specific error message currently. But if you want to disable logging here is the link

Feel free to let me know if doesn't help!