Comments (10)
Instead of configuration, wich is fixed for all pywren executions, IBM-PyWren already contains a parameter to set internal log level:
pw = pywren.ibm_cf_executor(log_level='DEBUG')
However, code executed in CF does not get this configuration. It should be propagated.
from lithops.
The default if log_level is not provided should be INFO (to reduce number of log prints )
from lithops.
Adding more to this thread, logging level should get to cos.py, that currently contains
logging.getLogger('ibm_boto3').setLevel(logging.CRITICAL)
logging.getLogger('ibm_botocore').setLevel(logging.CRITICAL)
logging.getLogger('urllib3').setLevel(logging.CRITICAL)
logger = logging.getLogger(__name__)
from lithops.
@omerb01 can you please handle this?
from lithops.
@JosepSampe we can provide log level as you suggested
pw = pywren.ibm_cf_executor(log_level='DEBUG')
but this one also works, what is the difference, if any?
import logging
logging.basicConfig(level=logging.DEBUG)
pw = pywren.ibm_cf_executor()
from lithops.
@gilv They are two different ways to set logging level.
The one integrated in PyWren (pw = pywren.ibm_cf_executor(log_level='DEBUG')
) uses the wrenlogging.py module, that uses a personalized log format:
2019-03-20 08:51:08,083 [INFO] pywren_ibm_cloud.cf_connector: IBM Cloud Functions init for namespace: [email protected]_us_east
2019-03-20 08:51:08,083 [INFO] pywren_ibm_cloud.cf_connector: IBM Cloud Functions init for host: https://us-east.functions.cloud.ibm.com
2019-03-20 08:51:08,083 [INFO] pywren_ibm_cloud.invokers: IBM Cloud Functions init for Runtime: pywren_3.6
2019-03-20 08:51:08,626 [INFO] pywren_ibm_cloud.executor: IBM Cloud Functions executor created with ID 8425f7a3-fed7
In contrast, the other case you need to import the logging module and manually set the logging.basicConfig, which has another log format:
INFO:pywren_ibm_cloud.cf_connector:IBM Cloud Functions init for namespace: [email protected]_us_east
INFO:pywren_ibm_cloud.cf_connector:IBM Cloud Functions init for host: https://us-east.functions.cloud.ibm.com
INFO:pywren_ibm_cloud.invokers:IBM Cloud Functions init for Runtime: pywren_3.6
INFO:pywren_ibm_cloud.executor:IBM Cloud Functions executor created with ID 484b1049-4eb3
Maybe from a user perspective it is easier to set the log level parameter in the executor rather than have to import the logging package and manually create the logging config in each file.
from lithops.
@gilv logging level gets already to cos.py
do you want to get information from packages ibm_boto3
, ibm_botocore
and urllib3
also? cause currently for these packages, logging level is set to CRITICAL only.
from lithops.
@omerb01 this is cos.py looks like
logging.getLogger('ibm_boto3').setLevel(logging.DEBUG)
logging.getLogger('ibm_botocore').setLevel(logging.CRITICAL)
logging.getLogger('urllib3').setLevel(logging.CRITICAL)
logger = logging.getLogger(name)
logging doesn't get there.
@omerb01 let's folllow suggestion from @JosepSampe above.
from lithops.
@gilv as we discussed, added an option to get boto3
logs on pull request #100
usage:
pw = pywren.ibm_cf_executor(log_level='DEBUG_BOTO3')
from lithops.
This issue is finally fixed in pull #102
Now functions have same log_level as the local PyWren
from lithops.
Related Issues (20)
- Different behaviours for list_keys depending on the storage backend HOT 8
- Data passed to wrong activation parameter HOT 4
- Execution stats documentation error
- IBM VPC config issue HOT 1
- [Enhancement] Allow download_files for AWS to use multipart download HOT 2
- AWS Lambda function name HOT 11
- AWS spot instance and consume mode HOT 2
- Bump a new version HOT 2
- [Bug] AWS Lambda calls fail after consecutive call
- AWS Lambda invoker's performance depends on the Python interpreter HOT 10
- [GCP Storage] 429 Too Many Requests in bucket creation during map stage
- [AWS EC2] New charge for public IPv4 addresses starting February 1, 2024 HOT 1
- VM setup without root privileges. HOT 1
- Problem in combination IBM CE and Lithops HOT 7
- AWS S3 PutObject limitation HOT 4
- Problem in combination AWS Lambda and Lithops HOT 10
- Restart failed futures only HOT 2
- FileNotFoundError: func.pickle not found in customized_runtime for AWS Lambda HOT 10
- StandaloneExecutor reuse problem HOT 4
- Lithops from main branch not working anymore. HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lithops.