Marklogic审核日志 [英] Marklogic Audit Log

查看:60
本文介绍了Marklogic审核日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会看到MarkLogic提供的以下示例审核日志记录

I would see the below sample audit logging which MarkLogic provides

Sample logging : 2012-03-26 10:55:53.735 event=amp-usage; 
function=http://marklogic.com/xdmp/admin:read-config-file;
uri=/MarkLogic/admin.xqy; database=filesystem;
success=true; user=admin; roles=admin;

我可以通过添加下面突出显示的更多其他详细信息来自定义此消息

Can I customize this message by adding few more details highlighted below like this

示例日志记录:2012-03-26 10:55:53.735 event = amp-usage; function = http://marklogic.com/xdmp/admin:read-config-file ; uri =/MarkLogic/admin.xqy;数据库=文件系统;成功=真;用户=管理员;角色=管理员; 已收到由源id = xxxx Web调用的对租户ID = xxxxx的请求.请求ID xxxx

Sample logging : 2012-03-26 10:55:53.735 event=amp-usage; function=http://marklogic.com/xdmp/admin:read-config-file; uri=/MarkLogic/admin.xqy; database=filesystem;success=true; user=admin; roles=admin; Received request for Tenant Id=xxxxx called by source id=xxxx Web. Request ID xxxx

推荐答案

当然可以实现.

  1. 创建一个模块(例如activity-log.xqy),该模块创建日志文件[xdmp:document-insert()]并将其插入审核数据库.

  1. Create a module (say activity-log.xqy) which creates and insert log document [xdmp:document-insert()] into audit database.

从另一个模块(例如logger.xqy)调用它,该模块会生成日志记录任务[xdmp:spawn()],在这里您将指定数据库名称,因此请进行审计.

Call it from another module (say, logger.xqy) which spawns the logging task [xdmp:spawn()], here you will specify the database name, so give audit in that.

这篇关于Marklogic审核日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆