* commit work, mostly untested
* v minor refactor
* force new renderer
* Code style changes
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
* Use Rich's default console object instead of making one
* Bump Rich to version 9.8.2
* Disable indent guides in tracebacks
* Skip empty lines between stack levels in traceback rendering
* Use full width of the terminal when printing tracebacks
* Disabling syntax highlighting on the log messages
* Make logger name bold
* Make logger level bold
* Make URLs in console bold
* Change `bright_blue` and `blue` colors in syntax theme (NEEDS CHANGING)
* Show only one line per stack level in tracebacks
* Shuffle things in `redbot.logging` a bit
* Change logging handler while redirecting stdout in Dev cog
* Revert last two commits...
This reverts commit cf563bd06a6ae398da12713ceef3db9cc903d902.
This reverts commit 6dddf300726ddf89b8924441eed59b67b58faca0.
* Change Rich console to always print to sys.stdout (therefore ignoring stdout redirects)
* Pass cli_flags to init_logging()
* Add a flag to set the amount of extra lines in rich tracebacks
* First take on the syntax theme colors
* Use the Windows trick
* ARE YOU SERIOUS!?
* Remove dead code
* Use Monokai when Terminal application supports truecolor
* Syntax theme update
* Change logger name color
* This is not needed
* Adjust logging level colors
* Add a flag for showing local variables in Rich tracebacks
* change imports a bit
* Remove usage of blue color fully
* Stop highlighting in Red-DiscordBot splash
* Fix unreadable paths in tracebacks
* Make CRITICAL logging level more readable
* Make time in logs more readable
* Fix the first row being bolded in tables
* Update rich to 9.9.0
* Pop stash
* add rich to setup
* Added forceful enabling of rich logging
* revert some unintended pushed
* Fix possible unbound var
Fix possible 0 members w/out members intent
* One day I won't forget to do style passes
* So this is a thing apperently...
* Bump rich to 9.5.1
* Lock secondary deps
* Different stuff, see the full commit description for more info
- Change few things from print to log.info
- put the log handlers on the root logger instead of individual loggers
- capture warnings to a logger
* Modify log handler to show logger name
* Add a Triboolian to force disable rich
* Style checks
* shortened time, added logger name... again.
* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
* Style & linking
* Be or not to be? Whatever man, it's 4:30 in the morning, goto sleep >.<
* Reintroduce outdated message.
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
* Logging enhancements and cleanup
- Removed debug log messages every time `Config.get_conf` is used or a JSON file is read/saved. The basic configuration is now logged once with DEBUG when the bot starts up instead.
- Changed logging output format to reverse date order, include seconds, and use the logger's name instead of the module, function and line number.
- Log files are now kept in the `DATAPATH/core/logs` directory. Each time Red is restarted, a new log is created, and the old ones renamed in a rotating fashion. There can be a maximum of 9 logs in total.
- Each log file now has a smaller max size of 500KB before it will be split into multiple parts. There are also a maximum of 9 parts of each log.
- Discord.py logger now uses the same output formatter as red's loggers
- Moved logging setup code into `redbot.logging` module.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Reformat
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Implement discussed changes
- We maintain a red.log over multiple runtimes, alongside a latest.log and previous.log for individual runtimes.
- Naming convention changed a bit. E.g. when latest.log is just one part, it will be named latest.log. When it becomes two parts, they will both be named latest-part1.log and latest-part2.log.
- Rotation direction is reversed. This means as the files end up being named in chronological order.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>