-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Issue with Python Logging in Jaclang (Version 0.7.18) #1381
Comments
@marsninja After looking into the jac_gen file, I suspect the issue might be with how jac_import is handling the logging module. from __future__ import annotations
from jaclang import jac_import as __jac_import__
import typing as _jac_typ
if _jac_typ.TYPE_CHECKING:
import logging
else:
logging, = __jac_import__(target='logging', base_path=__file__, lng='py', absorb=False, mdl_alias=None, items={}) |
have you tried using the logger instance to log? something like this
|
Hey @ypkang, @kashmithnisakya
|
Description:
I am trying to integrate Python logging in Jaclang, but I’ve encountered an issue where the log file is not created as expected.
Here’s the Python code I tested:
This Python code works as intended and creates a
logfile.log
with the following output:However, when I try to do the same in
Jac (version 0.7.18)
using the following Jac code, the log file is not created:Expected Behavior:
logfile.log
should be created, and it should contain the log entries as specified in the code.Actual Behavior:
Steps to Reproduce:
Environment:
Could you please look into why this issue is occurring in Jac and why it is not creating the log file as it does with the Python implementation?
Thank you!
The text was updated successfully, but these errors were encountered: