on 07-29-2004 11:27 AM
I'm developing an application and I want to have custom logging for it.
I wrote in the logger.xml file
<logger
name="default_logger"
loggerInterface="com.sapportals.portal.prt.logger.ILogger"
isActive="true"
pattern="%d # %20t %15s %m #">
<LoggerClass
className="com.sapportals.portal.prt.logger.SimpleFileLogger"
level="WARNING">
<param
filename="logs/workplace.log"
append="false"
limit="800000">
</param>
</LoggerClass>
<LoggerClass
className="com.sapportals.portal.prt.logger.ConsoleLogger"
level="SEVERE">
</LoggerClass>
</logger>
from the Portal Runtime document.
But when I try see if the logger is active I get that it's not active.
From System Administration > Monitoring >Portal >Console Logging > Configuration Mode
Server Name : Server 0 00_569322500 - 569322499
Logger Name : sapapplication_logger
Logger Activated : true
Logger Pattern :
Logger Class : com.sapportals.portal.prt.logger.SimpleFileLogger
Level : WARNING
Log File : logs/sapapplication.log
Maximum Size (in Bytes) :
So I assume the logger is activated.
I also don't find the sapapplication.log either.
Any clue ?
Tanks,
Lucian.
Hi Lucian,
Usually I use a custom log for my own applications. In order to do that it's enough to write a logger.xml file like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>
<Logger name = "<your application name>" loggerInterface = "com.sapportals.portal.prt.logger.ILogger" isActive = "true">
<LoggerClass className = "com.sapportals.portal.prt.logger.SimpleFileLogger" level = "ALL">
<param filename = "logs/<your application name>.log" append = "false">
</param>
</LoggerClass>
</Logger>
</Server>
and put it into logger folder of your own application.
Afterwards instance this logger within your own component, for example:
public class MyComponent extends AbstractPortalComponent {
private final static String LOGGER = "<your application name>";
private final static ILogger log = PortalRuntime.getLogger(LOGGER);
and than use it.
I hope this could help you
Regards
Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.