Colorful Console Output function parameter
Archiviert 2 years ago
I
infinimonster
In joinify.py when i try to use the log function like this:
```py
log(log_text="Could not load the config.toml file.", printtype="error", threadindex=None)
```
printtype seem to appear as empty string inside utility.py and so it ofc won't colorize anything. manually adding an type inside the logfunction works but i need to get it working with the argument
```py
def log(log_text=None, printtype=None, threadindex=None):
if log_text is None: print(); return
print("printype: ", printtype)
print(f"{current_time()}{colorize('error', 1)} some error")
log_output = f"{current_time()}{colorize(printtype, threadindex)} {log_text}"
print(log_output)
```
