Skip to content

Add an option for log file location to device server. #267

@iandobbie

Description

@iandobbie

The device server accepts a logging_level option I think we should add a logging_dir option as well. The root of this need is the cockpit-distribution code for the simulation with a large image used to simulate a microscope. On a Mac the newer versions of MacOS (sorry don't know how new but happens with 12.6.2) will not open relative paths with sandboxed apps, such as those built with pyinstaller.

The device server currently open log files as simply

log_handler = RotatingFileHandler(
"%s_%s_%s.log" % (cls_name, host, port)
)

Which is just a relative path to the current working directory. In the mac packaged app this kills the device_server breaking the simulation mode application. More details in the thread at:

microscope-cockpit/cockpit-distribution#2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions