Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ venv/
build/
dist/
wheelhouse/
__pycache__/

.mypy_cache/

Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
project(
'pymmcore',
'cpp',
version: '12.2.2.75.1.dev0',
meson_version: '>=1.4.0',
version: '12.4.0.75.0.dev0',
meson_version: '>=1.8.0',
default_options: [
'cpp_std=c++17',
'warning_level=3',
Expand Down
26 changes: 26 additions & 0 deletions src/pymmcore/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ Uninitialized: Final = 0
InitializedSuccessfully: Final = 1
InitializationFailed: Final = 2

# LogLevel
LogLevelTrace: Final = 0
LogLevelDebug: Final = 1
LogLevelInfo: Final = 2
LogLevelWarning: Final = 3
LogLevelError: Final = 4
LogLevelCritical: Final = 5

g_CFGCommand_ConfigGroup: Final[Literal["ConfigGroup"]]
g_CFGCommand_ConfigPixelSize: Final[Literal["ConfigPixelSize"]]
g_CFGCommand_Configuration: Final[Literal["Config"]]
Expand Down Expand Up @@ -241,6 +249,7 @@ PropertyType = int
FocusDirection = int
DeviceDetectionStatus = int
DeviceInitializationState = int
LogLevel = int
AffineTuple = Tuple[float, float, float, float, float, float]

# These are special string types used throughout the API.
Expand Down Expand Up @@ -727,6 +736,10 @@ class CMMCore:
"""Returns the current position of the stage in microns."""
def getPrimaryLogFile(self) -> str:
"""Return the name of the primary Core log file."""
def getPrimaryLogLevel(self) -> LogLevel:
"""Return the current primary log file level."""
def getStderrLogLevel(self) -> LogLevel:
"""Return the current stderr log level."""
def getProperty(
self, label: DeviceLabel | str, propName: PropertyName | str
) -> str:
Expand Down Expand Up @@ -1002,6 +1015,11 @@ class CMMCore:
for XY stages that are sequenceable
"""
@overload
def log(self, msg: str, level: LogLevel) -> None: ...
@overload
def log(self, msg: str, level: LogLevel, loggerName: str) -> None:
"""Log a message at the given level."""
@overload
def logMessage(self, msg: str) -> None:
"""Record text message in the log file."""
@overload
Expand Down Expand Up @@ -1200,6 +1218,14 @@ class CMMCore:
@overload
def setPrimaryLogFile(self, filename: str, truncate: bool) -> None:
"""Set the primary Core log file."""
def setPrimaryLogFileRotation(
self, maxFileSize: int, maxBackupCount: int
) -> None:
"""Set the primary log file rotation parameters."""
def setPrimaryLogLevel(self, level: LogLevel) -> None:
"""Set the log level for the primary log file."""
def setStderrLogLevel(self, level: LogLevel) -> None:
"""Set the stderr log level."""
def setProperty(
self,
label: DeviceLabel | str,
Expand Down
1 change: 1 addition & 0 deletions src/pymmcore/pymmcore_swig.i
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ namespace std {

%import "CoreDeclHelpers.h"

%include "LogLevel.h"
%include "MMDeviceConstants.h"
%include "Error.h"
%include "Configuration.h"
Expand Down
2 changes: 1 addition & 1 deletion subprojects/mmcore.wrap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[wrap-git]
url = https://github.com/micro-manager/mmcore.git
revision = 4c0413041d1c2144276b11a39f66f81853cd4010
revision = 29e7de3344988e4b5886c4d7368f72fd61366e42
depth = 1

[provide]
Expand Down
Loading