title: how can I access a variable parameter at spider class from pipelines.py
body: <p>I have 3 number of spider files and classes. And I want to save item informations at csv file which has different filename defendant the variable parameter of searching condition. For that, I need to access the spider class parameter.</p>
  
  <p>So, my questions are three.</p>
  
  <ol>
  <li>How can I access the spider class's parameter?</li>
  <li>What is the best way to make each csv files? The trigger condition is that will call request at parse function for new searching result.</li>
  <li><code>logger = logging.getLogger(__name__)</code> it's not working in <code>pipelines.py</code>
  How can I print that information?</li>
  </ol>
  
  <p>Bellow is my log code style</p>
  
  <pre><code>logger.log(logging.INFO,'\n======= %s ========\n', filename)
  </code></pre>
  
  <p>I had been searching the ways in google so many times. But I couldn't find the solution.</p>
  
  <p>I did try to use from_crawler function, but I couldn't find the adapt case</p>
  
  <pre><code>Scrapy 1.6.0
  python 3.7.3
  os window 7 / 32bit
  </code></pre>
  
  <p>Code:</p>
  
  <pre class="lang-py prettyprint-override"><code>class CensusGetitemSpider(scrapy.Spider):
      name = 'census_getitem'
      startmonth=1
      filename = None
  
  def parse(self, response):
      for x in data:
         self.filename = str(startmonth+1)
         .
         .  
         .
         yield item
  
      yield scrapy.Request(link, callback=self.parse)
  
  </code></pre>