You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run sls invoke local... for my python project I see output when it imports everything and the return value but nothing during the function invocation that is written to logger.
I'm just using log = logging.getLogger(__name__)
and then log.info(), log.error(), etc.
I do see output from print()
I tried adding a logging.basicConfig(level=logging.DEBUG) too but no dice.
The text was updated successfully, but these errors were encountered:
I believe it's due to this commit.
Although the commit message could be clearer (or a comment added), I think the purpose is to replicate how Lambda already calls basicConfig.
So, in your example, basicConfig is invoked a second time on the root logger and gets ignored.
To get around it, as per Lambda docs, you can however call log.setLevel(logging.DEBUG) and that seems to work.
When I run
sls invoke local...
for my python project I see output when it imports everything and the return value but nothing during the function invocation that is written to logger.I'm just using
log = logging.getLogger(__name__)
and then
log.info()
,log.error()
, etc.I do see output from
print()
I tried adding a
logging.basicConfig(level=logging.DEBUG)
too but no dice.The text was updated successfully, but these errors were encountered: