Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-1589

Logging in library profile

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.3
    • Component/s: None
    • Labels:
      None

      Description

      When using TVB in the library profile, existing loggers are disabled. For a scripting/library user, this is unacceptable.

      A simple example:

      ```
      import logging
      logging.basicConfig(level=logging.DEBUG)
      LOG = logging.getLogger('hello-world')

      LOG.warning('warn')
      LOG.error('error')
      LOG.info('info')
      LOG.debug('debug')

      import tvb.simulator.lab

      LOG.warning('warn')
      LOG.error('error')
      LOG.info('info')
      LOG.debug('debug')
      ```

      which produces

      ```
      WARNING:hello-world:warn
      ERROR:hello-world:error
      INFO:hello-world:info
      DEBUG:hello-world:debug
      ```

      but it should produce this twice.

      When working at the console or in library mode it would be preferable to leave logging configuration to the user, or allow the user to selectively activate it.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              lia.domide Lia Domide
              Reporter:
              marmaduke.woodman Marmaduke Woodman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour Time Not Required
                  1h