|
发表于 2014-3-15 13:44:42
|
显示全部楼层
SirDuke wrote:Hello
I'm trying to process server message log. Per the documentation bellow I should use TM1ServerMessageLogOpen. Does anyone knows proper declaration of the function and/or parameter(s) usage? I'm especially interested in filtering it by a date range.
Many tanks
[quote]The function TM1ServerMessageLogOpen allows you to access the message log files as of a certain time in the past. [/quote]
Another API function that Iboglix mentions in the document but has forgotten to document the details of. What a frickin' surprise.
You have two choices. One is to raise a support request, though given my own experience with Iboglix support on matters of the API they're just as likely to tell you that the functionality doesn't exist in the .Net API (sic) and that they'll mention it to the developers. (I kid you not, this was effectively the response that I got to one support request with regard to some functionality in the classic API on one occasion. After half a dozen e-mails in which I was finally able to convince them that I was not talking about (and had not mentioned) the .Net API but rather the classic API, they told me that the functionality didn't exist there either. Unfortunately I took them at their word over that until I was playing around with something earlier this year and realised how it could be done. I therefore do not put a great deal of faith in getting decent answers out of IBM Support on API questions.)
The other, and this is what I would do, is to assume that the arguments are likely to be similar to those of the function which opens the transaction log, TM1ServerLogOpen. The CubeFilter, UserFilter and FlagFilter arguments would have no context for the server message log, so I'd be inclined to just try out some code using the hPool, hServer and (possibly) rStartTime arguments as documented in that function. (I say "possibly" because the GUI for the message log, unlike that of the transaction log, does not provide the option of specifying start and end times. On the other hand the GUI for the transaction log allows you to specify an end time which is not an argument to the API function and is therefore probably handled by the GUI itself. It's therefore possible that such an argument exists for the Message Log function, but equally possible that it doesn't (Edit: Upon further reflection I'd say it's more probable that it doesn't) and that you would need to do any filtering in your code.)
As long as you try it on a dev server first the worst that can happen is that your client hits the desktop in a smouldering ruin, especially if it's Excel.
However one other thing to consider is that in later versions of TM1, certainly by 9.5.2, the message file is not actually locked by the server (unlike the transaction log). Consequently, depending on what you're doing with this and whether you (or more precisely the intended users of whatever it is that you're writing) have access to the log files folder of the server, it may be easier to simply open the thing as a text file and parse it rather than going through the API. If, on the other hand, they don't have such access, the API is the only practical option. |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|