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
Logging functionality #186
Conversation
Go on 👌 |
…e of debug level instead of verboseOutput
@s0md3v When you have some free time, could you please review this? |
Thanks for putting this much of effort into it, I appreciate it. I ran the following command and saw no changes to the output: Then I ran this command: The output was all the same and the I haven't checked the code yet and I understand that you may not have enabled this functionality yet. |
…r method to debug data using json
It should be fixed now, moved xsstrike.py imports as module loggers were initialized before parsing arguments thus only default handlers were used. Additionally, added |
Still doesn't work man. I tried setting the |
To log to a file you should at least specify |
I don't want to log to the file. I just want to limit the console output to certain type e.g. GOOD. That's what --console-log-level does right? |
Yeah, Just been trying it with |
I will try to look at it, but not sure which can be the problem you face or how to reproduce it. As you can see in pictures below the output I get is correct and moreover emiting log records based on level is done by the python logging module rather than my implementation, anyways, I will try to reproduce it. |
Sorry mate, my bad. It works. |
As you are the author of this new logging mechanism, I suggest you write a documentation for the newly added options. |
That's good! Find the requested documentation below, feel free to modify it as you think. For Developers
Usage Option: It is possible to choose a minimum logging level to display xsstrike logs in the console: Option: If specified, xsstrike will also write all logs with equal logging level or higher to a file: Option: Name of the file where logs will be stored. Note that if |
re-clone it |
Also tried |
What does it implement/fix? Explain your changes.
info
,run
... prefixes automatically based on the logging levelrun: Just to maintain current output format
good: Just to maintain current output format
vuln: To just print vulnerabilities as requested in issue log to file #146
Note that current prints have not been replaced yet as wanted to have some feedback before doing it and also that either the formatters, chosen prefixes and logging levels can be changed as desired
Where has this been tested?
Python Version: 3.7
Operating System: Debian based
Does this close any currently open issues?
Yes, issue: #146 and #160
Does this add any new dependency?
No
Does this add any new command line switch/option?
Yes, new command line options:
Any other comments you would like to make?
Just seen there's already an started implementation for this feature which follows a different approach and although I think not reinventing the wheel and using python's logging system may be better, feel completely free to discard this pr and use the currently started implementation.
Some Questions