-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a function to send messages to MessageLog #621
Comments
+1 That would be a nice feature, could we maybe leverage the REST API log
related endpoints? Maybe just give a simple feature to post via rest API a
message log entry like Logoutput in TIs. It would help
REST-based application transparency and collect logs in one place which
make log tracing simpler for solutions like Pulse or other ELK stack
solutions.
|
@PiotrRajtar I don't think there is a way to add But the unboundTI way works. The issue with your code is that, try:
pass
except Exception as ex:
logging.exception(f"Unable to send values to cube [{log_cube}].")
self.tm1.processes.execute_ti_code(lines_prolog=[f"LogOutput('ERROR', 'TM1py [{path.basename(__file__)}] "
f"{type(ex).__name__} please check [{LOG_FILE}] for details.');"]) I highly recommend the usage of parameter names ( @MariusWirtz Would it be possible to build a custom method that would take the |
@MariusWirtz @rkvinoth If no one is already picking this up, I would be happy to raise a PR for this for my first contribution to TM1py! Let me know :) |
That would be awesome. Currently I'm engaged with other stuff. Thanks! |
Here's the PR #639 :) |
Closed with #639 |
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:
Ideally, the function should be supported as a custom logging handler in the logging module.
The text was updated successfully, but these errors were encountered: