Skip to content
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

[WIP] adding LOG_FILEMODE settings for enabling mode in logging FileHandler #2494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eLRuLL
Copy link
Member

@eLRuLL eLRuLL commented Jan 12, 2017

I have been seeing a lot of questions on Stackoverflow related to controlling more the scrapy logs. One in particular is the ability to rewrite the logs in the same file, which would be easily handled with this improvement by adding LOG_FILEMODE='w' in settings.

This is still WIP, so if you agree with this improvement I will continue working on it (add documentation, tests, etc.)

Another possibility I was thinking is to add the ability to override an entire LogHandler (just like DUPEFILTER_CLASS), that way there would be more control over it, as we currently only support FileHandler, StreamHandler and NullHandler.

Please let me know what do you think.

@codecov-io
Copy link

codecov-io commented Jan 12, 2017

Current coverage is 83.45% (diff: 66.66%)

Merging #2494 into master will increase coverage by <.01%

@@             master      #2494   diff @@
==========================================
  Files           161        161          
  Lines          8780       8782     +2   
  Methods           0          0          
  Messages          0          0          
  Branches       1288       1288          
==========================================
+ Hits           7327       7329     +2   
  Misses         1205       1205          
  Partials        248        248          

Powered by Codecov. Last update 5586fc7...0fbc2a5

@eLRuLL
Copy link
Member Author

eLRuLL commented Jan 17, 2017

@redapple any idea here? would that be ok to create a LOGHANDLER_CLASS configurable settings variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants