on 10-25-2004 10:59 AM
Hello *,
I created following log-configuration.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
<log-configuration>
<log-formatters>
<log-formatter name="DefaultFormatter" pattern="%25d %-60l %s: %m" type="TraceFormatter"/>
</log-formatters>
<log-destinations>
<log-destination count="10" effective-severity="ALL" limit="1000000" name="DefaultDestination" pattern="FDLB_GUI.%g.trc" type="FileLog">
<formatter-ref name="DefaultFormatter"/>
</log-destination>
</log-destinations>
<log-controllers>
<log-controller effective-severity="ALL" maximum-severity="FATAL" minimum-severity="DEBUG" name="DefaultController">
<associated-destinations>
<destination-ref association-type="LOG" name="DefaultDestination"/>
</associated-destinations>
</log-controller>
</log-controllers>
</log-configuration>
From a Web Dynpro view I want to use the log-controller. I'm using the default logger:
/**
Logging location.
*/
private static final com.sap.tc.logging.Location logger =
com.sap.tc.logging.Location.getLocation(EinstiegView.class);
In the wdInit method I want to log a simple message:
public void wdDoInit()
{
//@@begin wdDoInit()
logger.setEffectiveSeverity(com.sap.tc.logging.Severity.ALL);
logger.fatalT("test logging to new file logger");
//@@end wdDoInit()
}
I see the message in the defaultTrace.0.log, but my own log file doesn't appear.
How to address the log-controller of my log-configuration.xml?
Thanks in advance,
Jürgen Dufner
Hi
Will this weblog help you
https://sdnkanab.sdn.sap.com/view/x.blogs/star/html/article?id=54106259-067d4599fc-27803d5e
regards
Pran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
we had the same 'problem'.
We switched the flag 'FrorceSingleTraceFile' off in the ConfigTool and that did the trick.
In an earlier posting someone mentioned that there is meanwhile an oss note on this issue.
Regards, Astrid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I guess the follwing part of your log-configuration is wrong:
<log-controller
effective-severity="ALL"
maximum-severity="FATAL" m
nimum-severity="DEBUG"
name="DefaultController">
.....
Try to change in log-configuration the value for name in <log-controller> to the start sequence of the packages to be logged. E.g., all our packages should start with com.yourcompanyname.projectname
To log all messages from classes in these packages make the name = com.yourcompanyname.projectname.
Hope that helps,
Regards, Astrid
Therefore I list
You can use FileLog for writing messages to specific files.
Use the following API for specifying the destination:
Syntax: logger.addLog(<log1>);
The simplest ways to do so is as below:
logger.addLog(new FileLog(C:
temp
<filename>.log); // filepath has to be valid.
Note that the file path can be relative also. This helps, as the code then becomes portable.
loc.addLog(new FileLog("
usr
sap
Output1.log", new TraceFormatter()));
Hope it helps!
Regards,
Vishnu Prasad Hegde
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.