Comments (8)
Mainly just because I REALLY like the look and style of my terminal logging. I'm fairly ignorant of the python builtin logging (having always used my own), could it be formatted with utilities like termcolor like mine is? And I also have two settings in mine that determine whether you want to keep logs or delete the old ones and whether you want to see terminal output or just a log file written. If this stuff can be replicated the sure, go for it.
from w.i.l.l.
Everything but the color can be replicated. That said, the built in logging is a lot more robust and fault tolerant and we should really be using it. Generally speaking, if it's in the standard library you want to use it rather than rolling your own unless you have a very good reason to do otherwise.
I'll get started refactoring the logging code today.
from w.i.l.l.
Yeah sure I guess. I am pretty partial to my terminal logging though, it's been a part of W.I.L.L for awhile. If you wouldn't mind going out of your way, can you get the log entry from the good builtin logging module and pass it through with termcolor like I've been doing?
from w.i.l.l.
I'll look into it. That said, I'm personally partial to removing termcolor all together. It doesn't play well with everything, especially on windows. It's all sorts of odd in PowerShell, for example.
from w.i.l.l.
Fair enough. I appreciate you working on it, thanks.
from w.i.l.l.
Ok. So I merged in the code and I can't seem to fix the following error:
Traceback (most recent call last): File "main.py", line 15, in <module> from logger import log File "/home/will/Code/W.I.L.L/logger.py", line 88, in <module> _setup_logger() File "/home/will/Code/W.I.L.L/logger.py", line 45, in _setup_logger log.setLevel(_get_logging_level()) File "/home/will/Code/W.I.L.L/logger.py", line 63, in _get_logging_level return logging.DEBUG if will_config["debug"] else logging.ERROR KeyError: 'debug'
I looked through the code and I'm not completely sure what's happening here. My config.json is set up
from w.i.l.l.
My mistake, I hadn't made the necessary changes to config.json. Closing
from w.i.l.l.
That really should be considered a bug. I'll write up a new issue.
from w.i.l.l.
Related Issues (20)
- Error 2: Appid missing HOT 5
- requirements file missing HOT 3
- Program doesn't exit on Ctrl+C HOT 2
- html parsing HOT 12
- Can't find the Slack token. HOT 1
- WolframAlpha error: invalid appid HOT 6
- Answers are displayed correctly in the terminal, but not sent to slack. HOT 16
- Logger throws exception if config information isn't found HOT 4
- Entering "cnn" breaks everything & makes the script hang/freeze. HOT 4
- WILL multiplies instead of adding. HOT 3
- Plugin creation testers wanted HOT 2
- plugin.json format HOT 3
- WILL calling plugin results in traceback HOT 2
- Increasing greetings HOT 3
- will.conf example in dev branch HOT 4
- What is the goal of WILL? What's the purpose? HOT 7
- Simple addition doesn't work HOT 5
- License file missing HOT 1
- W.I.L.L is currently down HOT 1
- Proposing a PR to fix a few small typos
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 w.i.l.l.