Skip to content
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

ability for app devs to turn off logs #72

Open
komuw opened this issue May 22, 2019 · 0 comments
Open

ability for app devs to turn off logs #72

komuw opened this issue May 22, 2019 · 0 comments

Comments

@komuw
Copy link
Owner

komuw commented May 22, 2019

While we are at it we should NOTSET as a debug level;

if self.loglevel.upper() not in ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]:

Python[1] allows these levels:

CRITICAL 
ERROR 
WARNING 
INFO 
DEBUG 
NOTSET

They are the same ones we should allow

  1. https://docs.python.org/3/library/logging.html#logging-levels
komuw added a commit that referenced this issue May 25, 2019
What:
- accept `logging.NOTSET` as a loglevel
- if you do not to see logs for a particular task/s, you can now do;
```python
    class AdderTask(wiji.task.Task):
        the_broker = wiji.broker.InMemoryBroker()
        queue_name = "AdderTask"
        loglevel = "NOTSET"

        async def run(self, a, b):
            return a + b
```

Why:
- Updates: #72
komuw added a commit that referenced this issue May 25, 2019
What:
- accept `logging.NOTSET` as a loglevel
- if you do not want to see logs for a particular task/s, you can now do;
```python
    class AdderTask(wiji.task.Task):
        the_broker = wiji.broker.InMemoryBroker()
        queue_name = "AdderTask"
        loglevel = "NOTSET"

        async def run(self, a, b):
            return a + b
```

Why:
- Updates: #72
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant