企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 500|回复: 2

TM1API TM1ServerMessageLogOpen parameters?

[复制链接]

66

主题

378

帖子

540

积分

高级会员

Rank: 4

积分
540
QQ
发表于 2014-3-15 12:41:16 | 显示全部楼层 |阅读模式
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
The function TM1ServerMessageLogOpen allows you to access the message log files as of a certain time in the past.
回复

使用道具 举报

67

主题

399

帖子

555

积分

高级会员

Rank: 4

积分
555
QQ
发表于 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
回复 支持 反对

使用道具 举报

73

主题

375

帖子

530

积分

高级会员

Rank: 4

积分
530
QQ
发表于 2014-3-15 15:04:45 | 显示全部楼层
Thanks Alan

I went the second route
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....

And your assumptions turned to be correct. It seems there are 3 params, hPool, hServer, hSomething of type string. hSomething seems to be also ignored at least for every single value I tried to pass into it. I would not mind (much) to filter records on client. On the other hand by default the result records I got are sorted for to oldest to latest. This is opposite the GUI behaves (which makes much more sense). I'm still scratching my head how to force API to give me latest record(s) first....Any idea?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2020-11-24 14:16 , Processed in 0.127961 second(s), 12 queries , Memcache On.

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表