You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To invoke the `ibex_bluesky_core` logger, create and use a `logger` object in [the standard way](https://docs.python.org/3/library/logging.html):
2
3
3
-
To invoke the bluesky logger, import and use it at the desired level:
4
4
```python
5
-
from ibex_bluesky_core.logger import logger
6
-
logger.blueskylogger.warning("Message to be logged")
5
+
import logging
6
+
logger = logging.getLogger(__name__)
7
+
logger.warning("Message to be logged")
7
8
```
8
-
The logger utilizes a `TimedRotatingFileHandler` defined in the `logging.conf` file that rolls over the log at midnight.
9
9
10
-
The default logging level is defined at `INFO`. This means that events of lesser severity will not be logged. To change the default level, change level attribute of logger_blueskycore in the `logging.conf`
10
+
The logger utilizes a `TimedRotatingFileHandler` defined in `src/ibex_bluesky_core/log.py` that rolls over the log at midnight.
11
+
12
+
By default, the log files will be created in `c:\instrument\var\logs\bluesky`. This can be configured by setting
13
+
the `IBEX_BLUESKY_CORE_LOGS` environment variable.
14
+
15
+
There are 3 primary logger objects which are "interesting" in the context of `ibex_bluesky_core`:
16
+
-`ibex_bluesky_core` itself
17
+
-`bluesky`, for low-level diagnostic logging from the run engine & plans
18
+
-`ophyd_async` for low-level diagnostic logging from ophyd-async devices
19
+
20
+
The default logging level for bluesky libraries is defined at `INFO`. This means that events of lesser severity will not be logged.
21
+
To change the logging level for all bluesky libraries simultaneously, call:
22
+
23
+
```python
24
+
from ibex_bluesky_core.log import set_bluesky_log_levels
25
+
set_bluesky_log_levels("DEBUG")
26
+
```
27
+
28
+
To change the logging level of just a single library (for example, just `opyhyd_async`), use the standard
0 commit comments