title: Error using python logging from Pydev
body: <p>I am using PyDev with Python 3.5 from Aptana installation. All worked fine until I decided to explore logging module, which I never used before. I started with new script from the tutorial:</p>
  
  <pre><code>import logging
  logging.warning('Watch out!')  # will print a message to the console
  logging.info('I told you so')  # will not print anything
  </code></pre>
  
  <p>in Pydev I have this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File     "C:\Users\Tomasz\workspace\basicLogging.py", line 7, in &lt;module&gt;
      logging.warning('Watch out!')  # will print a message to the console
  AttributeError: module 'logging' has no attribute 'warning'
  </code></pre>
  
  <p>I searched and found questions like: <a href="https://stackoverflow.com/questions/32848251/python-install-logging-module">python : install logging module</a> with similar problem but no solution. 
  Obviously the problem is not with installation. When I run exactly the same script from CMD I have correct output. 
  At the moment it seems like Pydev gives me error on most of my scripts. If I come back to the code wich previously worked fine, now I have this:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Tomasz\workspace\piClientFullQt.py", line 15, in &lt;module&gt;
      from matplotlib.backends import qt_compat
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\matplotlib\__init__.py", line 122, in &lt;module&gt;
      from matplotlib.cbook import is_string_like, mplDeprecation, dedent, get_label
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\matplotlib\cbook.py", line 33, in &lt;module&gt;
      import numpy as np
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\numpy\__init__.py", line 180, in &lt;module&gt;
      from . import add_newdocs
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\numpy\add_newdocs.py", line 13, in &lt;module&gt;
      from numpy.lib import add_newdoc
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\numpy\lib\__init__.py", line 8, in &lt;module&gt;
      from .type_check import *
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\numpy\lib\type_check.py", line 11, in &lt;module&gt;
      import numpy.core.numeric as _nx
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\numpy\core\__init__.py", line 58, in &lt;module&gt;
      from numpy.testing.nosetester import _numpy_tester
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\site-packages\numpy\testing\__init__.py", line 10, in &lt;module&gt;
      from unittest import TestCase
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\unittest\__init__.py", line 59, in &lt;module&gt;
      from .case import (TestCase, FunctionTestCase, SkipTest, skip, skipIf,
    File "C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\lib\unittest\case.py", line 273, in &lt;module&gt;
      class _CapturingHandler(logging.Handler):
  AttributeError: module 'logging' has no attribute 'Handler'
  </code></pre>
  
  <p>I am not sure how this happened. 
  If I do <code>print(sys.executable)</code> it gives the same path <code>C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\python3.exe</code> in both cases, CMD running fine and Pydev giving error.</p>
  
  <p>I have some problem with some python variables in Pydev (I think) but can't find how to fix it. </p>
  
  <p><strong>EDIT:</strong>
  I look at <a href="https://stackoverflow.com/questions/5595276/pydev-eclipse-python-interpreters-error-stdlib-not-found?rq=1">this</a> question and tried the answers</p>
  
  <p>Location of python interpreter is correct and it looks like I have all libs what I need</p>
  
  <pre><code>C:\Users\Tomasz&gt;python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
  C:\Users\Tomasz\AppData\Local\Programs\Python\Python35-32\Lib\site-packages
  </code></pre>
  
  <p>And site-packages are already in System PYHONPATH</p>
  
  <p>I tried Restore Defaults in Window -> Preferences -> PyDev -> Iterpreters -> Python Interpreter </p>
  
  <p><strong>EDIT:</strong>
  Following @Samuel advise I try:</p>
  
  <pre><code>import logging
  
  logger = logging.getLogger()
  logger.setLevel(logging.DEBUG)
  
  logging.warning('Watch out!')  # will print a message to the console
  logging.info('I told you so')  # will not print anything
  </code></pre>
  
  <p>and in PyDev I have:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Tomasz\workspace\SCT2python\goodExamps\logging\basicLogging.py", line 3, in &lt;module&gt;
      logger = logging.getLogger()
  AttributeError: module 'logging' has no attribute 'getLogger'
  </code></pre>
  
  <p>It works fine if I run it in command line as a script!!</p>
  
  <p><strong>EDIT: THE SOLUTION</strong>
  Thanks to @Samuel I figure out I made absolutely stupid mistake!
  Before I started playing with the library I made a folder to keep my scripts and stupidly I called it "logging". Obviously renaming the folder solved the problem!</p>