__doc__ = \
"""
=======================================================================================
Main-driver :obj:`LogStream` variables (:mod:`mango.application.main_driver.logstream`)
=======================================================================================

.. currentmodule:: mango.application.main_driver.logstream

Logging objects/attributes for :obj:`mango.application.main_driver.MainDriverFilter` filters.

Classes
=======

.. autosummary::
   :toctree: generated/
   
   LogStream - Message logging for :obj:`mango.application.main_driver.MainDriverFilter` filters.


Attributes
==========

.. autodata:: log

.. autodata:: mstLog

.. autodata:: mstOut

.. autodata:: warnLog

.. autodata:: errLog


"""

import mango
import mango.mpi as mpi

import os
import os.path
import sys
if sys.platform.startswith('linux'):
    import DLFCN as dl
    _flags = sys.getdlopenflags()
    sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)
    from . import _mango_main_driver as _mango_main_driver_so
    sys.setdlopenflags(_flags)
else:
    from . import _mango_main_driver as _mango_main_driver_so

from mango.core import LogStream

#: Messages sent to stdout, prefixed with :samp:`'P<RANK>'`, where :samp:`<RANK>` is MPI process world rank.
log  = _mango_main_driver_so._log

#: Messages sent to stdout, prefixed with :samp:`'MST'`, and messages also saved to history-meta-data.
mstLog  = _mango_main_driver_so._mstLog

#: Messages sent to stdout, prefixed with :samp:`'OUT'`.
mstOut  = _mango_main_driver_so._mstOut

#: Messages sent to stderr, prefixed with :samp:`'WARNING'`.
warnLog = _mango_main_driver_so._warnLog

#: Messages sent to stderr, prefixed with :samp:`'ERROR'`.
errLog  = _mango_main_driver_so._errLog

__all__ = [s for s in dir() if not s.startswith('_')]

[((42, 3, 42, 35), 'sys.platform.startswith', 'sys.platform.startswith', ({(42, 27, 42, 34): '"""linux"""'}, {}), "('linux')", False, 'import sys\n'), ((44, 13, 44, 33), 'sys.getdlopenflags', 'sys.getdlopenflags', ({}, {}), '()', False, 'import sys\n'), ((45, 4, 45, 50), 'sys.setdlopenflags', 'sys.setdlopenflags', ({(45, 23, 45, 49): '(dl.RTLD_NOW | dl.RTLD_GLOBAL)'}, {}), '(dl.RTLD_NOW | dl.RTLD_GLOBAL)', False, 'import sys\n'), ((47, 4, 47, 30), 'sys.setdlopenflags', 'sys.setdlopenflags', ({(47, 23, 47, 29): '_flags'}, {}), '(_flags)', False, 'import sys\n')]