faker spamming the logs
See original GitHub issueI use faker in a short running script. Starting apparently with 0.8.14, every time I initialize the faker, I see this in the logs:
INFO:faker.factory:Provider `faker.providers.address` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.automotive` has been localized to `en_US`.
WARNING:faker.factory:Specified locale `en_US` is not available for provider `faker.providers.bank`. Locale reset to `en_GB` for this provider.
INFO:faker.factory:Provider `faker.providers.barcode` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.color` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.company` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.credit_card` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.currency` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.date_time` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.file` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.internet` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.isbn` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.job` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.lorem` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.misc` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.person` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.phone_number` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.profile` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.python` does not feature localization. Specified locale `en_US` is not utilized for this provider.
INFO:faker.factory:Provider `faker.providers.ssn` has been localized to `en_US`.
INFO:faker.factory:Provider `faker.providers.user_agent` does not feature localization. Specified locale `en_US` is not utilized for this provider.
I expect two things differently:
- The logging at the info level should provide useful information. These info messages should probably be at the DEBUG level or so… since it’s not particularly useful information except in debugging.
- Since the default locale is en_US, all providers provided by the package should implement the default locale. In other words, the most basic usage of the library shouldn’t be emitting warnings.
For now, I’m disabling these logs with logging.getLogger('faker.factory').setLevel(logging.ERROR)
. It feels a bit fragile to have to key on faker.factory
. Can you provide a better recommendation?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:12
Top Results From Across the Web
Faker is spamming VI mid again. : r/ViMains - Reddit
20 votes, 11 comments. 14K subscribers in the ViMains community. A subreddit for all Vi mains from League of Legends.
Read more >Thorin on Twitter: "If you've watched Faker's Pro View then you ...
If you've watched Faker's Pro View then you'll now realise how utterly stupid ... on the topic of the benefits of spamming F...
Read more >Quiet down 'faker' in pytests - Reinout van Rees
Problem I'm having is that, when running the tests with pytest, pytest helpfully reports all the logging when something goes wrong. Only, tests ......
Read more >Dev corrupts NPM libs 'colors' and 'faker' breaking thousands ...
Open Source Revolution? The developer behind popular open-source NPM libraries 'colors' (aka colors.js on GitHub) and 'faker' (aka faker.
Read more >SKT Faker - You need to spam mastery emote to show...
SKT Faker is on Facebook. To connect with SKT Faker, join Facebook today. Join. or. Log In.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DataGreed if you set
logging.getLogger('faker').setLevel(logging.ERROR)
, it should mute all logging fromfaker
I’ve just released
v0.8.15
with all logging statements set toDEBUG