LLLLLLLLLLL SSSSSSSSSSSSSSS
L:::::::::L SS:::::::::::::::S
L:::::::::L S:::::SSSSSS::::::S
LL:::::::LL S:::::S SSSSSSS
L:::::L ooooooooooo ggggggggg ggggg ggggggggg ggggg eeeeeeeeeeee S:::::S
L:::::L oo:::::::::::oo g:::::::::ggg::::g g:::::::::ggg::::g ee::::::::::::ee S:::::S
L:::::L o:::::::::::::::o g:::::::::::::::::g g:::::::::::::::::g e::::::eeeee:::::eeS::::SSSS
L:::::L o:::::ooooo:::::og::::::ggggg::::::ggg::::::ggggg::::::gge::::::e e:::::e SS::::::SSSSS
L:::::L o::::o o::::og:::::g g:::::g g:::::g g:::::g e:::::::eeeee::::::e SSS::::::::SS
L:::::L o::::o o::::og:::::g g:::::g g:::::g g:::::g e:::::::::::::::::e SSSSSS::::S
L:::::L o::::o o::::og:::::g g:::::g g:::::g g:::::g e::::::eeeeeeeeeee S:::::S
L:::::L LLLLLLo::::o o::::og::::::g g:::::g g::::::g g:::::g e:::::::e S:::::S
LL:::::::LLLLLLLLL:::::Lo:::::ooooo:::::og:::::::ggggg:::::g g:::::::ggggg:::::g e::::::::e SSSSSSS S:::::S
L::::::::::::::::::::::Lo:::::::::::::::o g::::::::::::::::g g::::::::::::::::g e::::::::eeeeeeee S::::::SSSSSS:::::S
L::::::::::::::::::::::L oo:::::::::::oo gg::::::::::::::g gg::::::::::::::g ee:::::::::::::e S:::::::::::::::SS
LLLLLLLLLLLLLLLLLLLLLLLL ooooooooooo gggggggg::::::g gggggggg::::::g eeeeeeeeeeeeee SSSSSSSSSSSSSSS
g:::::g g:::::g
gggggg g:::::g gggggg g:::::g
g:::::gg gg:::::g g:::::gg gg:::::g
g::::::ggg:::::::g g::::::ggg:::::::g
gg:::::::::::::g gg:::::::::::::g
ggg::::::ggg ggg::::::ggg
gggggg gggggg
If you want a different approach than following your logs by typing print between codes or do not want to use logging library, here is Logges.
With Logges, you can follow your logs that you want to follow, whether you print them on the screen or not, and automate your log outputs by making these log outputs as LOG, PDF, MD or Zipped file.
You can install Logges with typing pip install Logges on Python package managers/terminal. (Docker file will be here as soon as possible)
- 📌 Import package as
from Logges import Logges - 📌 Firstly, Optional parameter is
Logges.setup(). You can name your log file withlognameparameter and print logs withstatusparameters (Default isLogges.LogStatus.ERROR). - 📌 We have 5 log type under LogStatus enums;
- 💎 LogStatus.DEBUG
- 💎 LogStatus.INFO
- 💎 LogStatus.WARNING
- 💎 LogStatus.ERROR
- 💎 LogStatus.CRITICAL
- 📌 Before add logs, you can ignore specific files and directories on your logs with using
ignore_files()method. - 📌 You can check in entered logs messages with
in_log()method withkeywordparameter. It returnsTrueorFalseif keywords in log messages. - 📌 Finally, you can add your logs with
log()method with specific parameters.- ➕
msgparameter defines your messages, alsa could be a variable which can be print. - ➕
statusparameter defines your log type. Default is DEBUG but you can change it with LogStatus enums. - ➕
print_logdefault isFalse, if your status is equal or upper thanstatusofsetupparameter, it will also print if you set itFalse.
- ➕
- 📌 Also you can export your logs as
log,md,pdforzipfiles, which is exported asmd, pdf, log.
Check our example scripts to understand how to use.
- 📌 Also we have an CLI tool about log files.
- 📌
loggesis main command for listing, showing, searching operations. - 📌
logges listhas 2 optional parameter for listing log files.- 💎
--max-dateis filtering logs with maximum date. - 💎
--min-dateis filtering logs with minimum date. - 💎 Please enter your date format as YYYY-MM-DD
- 💎
- 📌
logges showis showing entered filename.- 💎
-f/--fileparameter is defines the log filename which is showing onlistcommand or local file. - 💎
--local_fileparameter default isFalse, if you want to see your local log file, you need to set this parameterTrue.
- 💎
- 📌
logges searchis filtering command in all log files.- 💎
--max-dateis filtering logs with maximum date. - 💎
--min-dateis filtering logs with minimum date. - 💎
-sen/--sentencesis REQUIRED parameter for filtering. It search keywords (seperated with,) in log messages. - 💎
-fun/--functionsis filtering functions on logs. - 💎
-sta/--statusis filtering status on log. - 💎
-fi/--filesis filtering executed files in log file. - 💎
-e/--exportif you want to export result, set this parameterTrue. - 💎
--export_name, if you set--export=True, it defines exported file name.
- 💎
If you find any bug or want to a feature nice-to-have, do not hesitate open an issue page.