Skip to content

Commit

Permalink
Rename _logger -> log in Optislang() class and api documentation. (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
PanekOndrej authored and rfahlberg committed Oct 4, 2022
1 parent 565e77b commit 07b6f6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/source/api/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ For these two types of loggers, the default log message format is:
>>> from ansys.optislang.core import Optislang
>>> osl = Optislang(loglevel='INFO')
>>> osl._logger.info('This is an useful message')
>>> osl.log.info('This is an useful message')
.. code:: bash
Expand Down
4 changes: 2 additions & 2 deletions src/ansys/optislang/core/optislang.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(
self.__name = name
self.__password = password

self._logger = LOG.add_instance_logger(self.name, self, loglevel)
self.log = LOG.add_instance_logger(self.name, self, loglevel)
self.__osl_server: OslServer = self.__init_osl_server("tcp")

def __init_osl_server(self, server_type: str) -> OslServer:
Expand Down Expand Up @@ -124,7 +124,7 @@ def __init_osl_server(self, server_type: str) -> OslServer:
no_save=self.__no_save,
ini_timeout=self.__ini_timeout,
password=self.__password,
logger=self._logger,
logger=self.log,
)
else:
raise NotImplementedError(f'OptiSLang server of type "{server_type}" is not supported.')
Expand Down

0 comments on commit 07b6f6b

Please sign in to comment.