Liferay:登录Liferay的默认方法是什么? [英] Liferay: what is the default approach for logging in Liferay?

查看:111
本文介绍了Liferay:登录Liferay的默认方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过Portlet,Hook等的开发.我已经看到了用于登录Liferay的不同方法.有没有我可以使用的默认日志记录方法-Liferay方式.

By development of portlets, hooks etc. I have seen different approaches for logging in Liferay. Is there default logging approach - The Liferay Way - that I can use.

1.如何初始化记录器?

1.How to initialize the logger?

2.如何配置日志记录级别?

2.How to config the logging levels?

我已经看到可以在Liferay-控制面板中直接修改日志记录级别,这很好吗?如何将其与配置文件结合?

I have seen that the logging level can be modified direct in Liferay - Control Panel, is it good? How can I combine it with config file?

推荐答案

您可以在总结:您应该通过LogFactory实例化Log4j Log对象,该对象由当前的类名标识,然后在控制面板的日志级别"设置选项卡上启用该日志类别.

Summarized: you should instantiate your Log4j Log object through LogFactory, identified by the current class name, then enable that log category on the control panels "Log level" settings tab.

这篇关于Liferay:登录Liferay的默认方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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