'hidden' error message #30

Closed
opened 2020-09-30 17:35:35 +02:00 by big-vl · 11 comments
big-vl commented 2020-09-30 17:35:35 +02:00 (Migrated from github.com)

i dont want to see error messages in the console, i only want to receive True and False, how to do this? I set debug=False

i dont want to see error messages in the console, i only want to receive True and False, how to do this? I set debug=False
karolyi commented 2020-09-30 17:37:09 +02:00 (Migrated from github.com)

In order for me to be able to answer your question, post the logs it's emitting please.

In order for me to be able to answer your question, post the logs it's emitting please.
big-vl commented 2020-10-01 00:03:41 +02:00 (Migrated from github.com)

............Validation for '' failed: Invalid email address.
.Validation for '' failed: Invalid email address.
......Validation for '' failed: Invalid email address.
..Validation for '' failed: Invalid email address.
.

............Validation for '' failed: Invalid email address. .Validation for '' failed: Invalid email address. ......Validation for '' failed: Invalid email address. ..Validation for '' failed: Invalid email address. .
big-vl commented 2020-10-01 00:07:40 +02:00 (Migrated from github.com)

I wrote tests during registration so that registration would not take place, respectively, he says that the email is empty, the test is completed successfully, since it cannot register as planned by the tests, but I do not need such messages in tests, how to disable it?

I wrote tests during registration so that registration would not take place, respectively, he says that the email is empty, the test is completed successfully, since it cannot register as planned by the tests, but I do not need such messages in tests, how to disable it?
karolyi commented 2020-10-01 12:00:27 +02:00 (Migrated from github.com)

Do you use any of python's logging module in your code? This project uses the same framework (just like django does), and so if you do, you can set up logging filters to filter out this module's messages.

Do you use any of python's logging module in your code? This project uses the same framework (just like django does), and so if you do, you can set up logging filters to filter out this module's messages.
karolyi commented 2020-10-01 12:12:16 +02:00 (Migrated from github.com)

Also, passing an empty email address will result in failure, of course.

Also, passing an empty email address will result in failure, of course.
big-vl commented 2020-10-01 17:40:49 +02:00 (Migrated from github.com)

I use this in tests, do you suggest that I disable the logging log in tests?
I run the tests with the command:
python3 -m unittest -v
your suggestions? I have 30 test files.

I use this in tests, do you suggest that I disable the logging log in tests? I run the tests with the command: python3 -m unittest -v your suggestions? I have 30 test files.
karolyi commented 2020-10-01 17:51:20 +02:00 (Migrated from github.com)

you can construct a test runner with disabling logging, something like the opposite of how to post debug logs.

you can construct a test runner with disabling logging, something like [the opposite of how to post debug logs](https://github.com/karolyi/py3-validate-email#my-email-doesnt-check-out).
big-vl commented 2020-10-01 23:56:35 +02:00 (Migrated from github.com)

I understood in which direction to look, but then I will not see the prints I need, I already understood this, everything is very bad, it's a pity that I will have to use a modified version of your module to easily disable logs, because of one message

I understood in which direction to look, but then I will not see the prints I need, I already understood this, everything is very bad, it's a pity that I will have to use a modified version of your module to easily disable logs, because of one message
karolyi commented 2020-10-03 14:13:12 +02:00 (Migrated from github.com)

logging ≠ debug.

What you want here is to remove logging entirely by turning off the debug option. Logging is for generic information about the validated addresses. I will look into what's doable, but wanted to clarify this.

logging ≠ debug. What you want here is to remove logging entirely by turning off the debug option. Logging is for generic information about the validated addresses. I will look into what's doable, but wanted to clarify this.
big-vl commented 2020-10-03 14:22:38 +02:00 (Migrated from github.com)

if I disable then I don't see the information I need, it intersects with logging, why don't you make it easier, your module is the best, but I would like to disable logging in your module

if I disable then I don't see the information I need, it intersects with logging, why don't you make it easier, your module is the best, but I would like to disable logging in your module
karolyi commented 2020-10-04 12:40:31 +02:00 (Migrated from github.com)

Closing this as wontfix.

With a little bit of searching and learning, you can find yourself a way to filter out your unwanted messages from logging. I just did it locally for testing.

Coming here and complaining about how it's not doing what you want is not a bug, it's you not wanting to put in the work and research it.

Closing this as wontfix. With a little bit of searching and learning, you can find yourself a way to filter out your unwanted messages from logging. I just did it locally for testing. Coming here and complaining about how it's not doing what you want is not a bug, it's you not wanting to put in the work and research it.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: karolyi/py3-validate-email#30
No description provided.