Skip to content

Commit d93887e

Browse files
authored
Merge pull request #173 from marktsuchida/mmcore-12.3
MMCore 12.4.0
2 parents 0019f22 + 6831f51 commit d93887e

5 files changed

Lines changed: 31 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ venv/
66
build/
77
dist/
88
wheelhouse/
9+
__pycache__/
910

1011
.mypy_cache/
1112

meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
project(
1919
'pymmcore',
2020
'cpp',
21-
version: '12.2.2.75.1.dev0',
22-
meson_version: '>=1.4.0',
21+
version: '12.4.0.75.0.dev0',
22+
meson_version: '>=1.8.0',
2323
default_options: [
2424
'cpp_std=c++17',
2525
'warning_level=3',

src/pymmcore/__init__.pyi

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ Uninitialized: Final = 0
8080
InitializedSuccessfully: Final = 1
8181
InitializationFailed: Final = 2
8282

83+
# LogLevel
84+
LogLevelTrace: Final = 0
85+
LogLevelDebug: Final = 1
86+
LogLevelInfo: Final = 2
87+
LogLevelWarning: Final = 3
88+
LogLevelError: Final = 4
89+
LogLevelCritical: Final = 5
90+
8391
g_CFGCommand_ConfigGroup: Final[Literal["ConfigGroup"]]
8492
g_CFGCommand_ConfigPixelSize: Final[Literal["ConfigPixelSize"]]
8593
g_CFGCommand_Configuration: Final[Literal["Config"]]
@@ -241,6 +249,7 @@ PropertyType = int
241249
FocusDirection = int
242250
DeviceDetectionStatus = int
243251
DeviceInitializationState = int
252+
LogLevel = int
244253
AffineTuple = Tuple[float, float, float, float, float, float]
245254

246255
# These are special string types used throughout the API.
@@ -727,6 +736,10 @@ class CMMCore:
727736
"""Returns the current position of the stage in microns."""
728737
def getPrimaryLogFile(self) -> str:
729738
"""Return the name of the primary Core log file."""
739+
def getPrimaryLogLevel(self) -> LogLevel:
740+
"""Return the current primary log file level."""
741+
def getStderrLogLevel(self) -> LogLevel:
742+
"""Return the current stderr log level."""
730743
def getProperty(
731744
self, label: DeviceLabel | str, propName: PropertyName | str
732745
) -> str:
@@ -1002,6 +1015,11 @@ class CMMCore:
10021015
for XY stages that are sequenceable
10031016
"""
10041017
@overload
1018+
def log(self, msg: str, level: LogLevel) -> None: ...
1019+
@overload
1020+
def log(self, msg: str, level: LogLevel, loggerName: str) -> None:
1021+
"""Log a message at the given level."""
1022+
@overload
10051023
def logMessage(self, msg: str) -> None:
10061024
"""Record text message in the log file."""
10071025
@overload
@@ -1200,6 +1218,14 @@ class CMMCore:
12001218
@overload
12011219
def setPrimaryLogFile(self, filename: str, truncate: bool) -> None:
12021220
"""Set the primary Core log file."""
1221+
def setPrimaryLogFileRotation(
1222+
self, maxFileSize: int, maxBackupCount: int
1223+
) -> None:
1224+
"""Set the primary log file rotation parameters."""
1225+
def setPrimaryLogLevel(self, level: LogLevel) -> None:
1226+
"""Set the log level for the primary log file."""
1227+
def setStderrLogLevel(self, level: LogLevel) -> None:
1228+
"""Set the stderr log level."""
12031229
def setProperty(
12041230
self,
12051231
label: DeviceLabel | str,

src/pymmcore/pymmcore_swig.i

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ namespace std {
397397

398398
%import "CoreDeclHelpers.h"
399399

400+
%include "LogLevel.h"
400401
%include "MMDeviceConstants.h"
401402
%include "Error.h"
402403
%include "Configuration.h"

subprojects/mmcore.wrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[wrap-git]
22
url = https://github.com/micro-manager/mmcore.git
3-
revision = 4c0413041d1c2144276b11a39f66f81853cd4010
3+
revision = 29e7de3344988e4b5886c4d7368f72fd61366e42
44
depth = 1
55

66
[provide]

0 commit comments

Comments
 (0)