Skip to content

Add a function to send messages to MessageLog #621

@PiotrRajtar

Description

@PiotrRajtar

It would be useful for tm1py to allow sending messages to the MessageLog, so that they can be easily browsed and picked up by Pulse alerts.

Currently I am doing something similar using an unbound TI, but is not ideal as whitespaces have to be replaced with some other separator, e.g. underscore, otherwise they get removed:

                logging.exception(f"Unable to send values to cube [{log_cube}].")
                self.tm1.processes.execute_ti_code(f"LogOutput('ERROR', 'TM1py_[{path.basename(__file__)}]"
                                                   f"_{type(ex).__name__}__Please_check_[{LOG_FILE}]_for_details.');")

Ideally, the function should be supported as a custom logging handler in the logging module.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions