microsoft / promptflow

Build high-quality LLM apps - from prototyping, testing to production deployment and monitoring.
https://microsoft.github.io/promptflow/
MIT License
9.59k stars 878 forks source link

[Feature Request] Logging statements are not present in log output #1899

Open bastbu opened 10 months ago

bastbu commented 10 months ago

Describe the bug

When emitting logging statements within a flow in prompt flow, they do not appear in the log output.

How To Reproduce the bug Steps to reproduce the behavior, how frequent can you experience the bug:

  1. In a Python node, emit a log using:
    • logger = logging.getLogger(__name__)
    • logger.warn("log statement")
  2. "log statement" should show up in the log output when running a flow

Expected behavior

"log statement" should show up in the log output when running a flow (and with that also in logs.txt).

Running Information(please complete the following information):

PeiwenGaoMS commented 10 months ago

Thank you for your feedback. We will fix this issue in the future.

github-actions[bot] commented 9 months ago

Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!

bastbu commented 8 months ago

@thy09 this issue was closed as not planned. I can't reactivate the issue, can you please reopen it?

github-actions[bot] commented 7 months ago

Hi, we're sending this friendly reminder because we haven't heard back from you in 30 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 7 days of this comment, the issue will be automatically closed. Thank you!

PeiwenGaoMS commented 7 months ago

Hi @bastbu , after review, this should be considered a feature request. We will consider enabling logging in the tool in the future. Thank you for your feedback.

sofyanajridi commented 4 months ago

Is there any temporary solution in place? We are planning to use prompt flow in production and would like to add our own logs. Even setting my own logging configuration like this: logging.basicConfig(filename="sample.log", level=logging.WARNING") is not even saving my logs to any file.

anuar12 commented 2 months ago

Is there any solution to this? I can't see print statements either

corticalstack commented 1 week ago

Following up, even setting the below, I don't see any of my own logging output in the logs:

import logging
os.environ["PF_LOGGING_LEVEL"] = "DEBUG"
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)