on 06-29-2005 6:18 PM
Hello!
I have configured log-configuration.xml and have followed steps in SAP Note 733903 to set ForceSingleTraceFile to NO. I don't see any log created as configured in the log-configuration.xml
Below is my log-configuration.xml and the code I use.
Can some one please let me know how can I turn logging on?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
<log-configuration>
<log-destinations>
<log-destination
count="3"
effective-severity="DEBUG"
limit="1000"
name="TraceFile"
pattern="/home/applications/myapp.trc"
type="FileLog"/>
</log-destinations>
<log-controllers>
<log-controller
effective-severity="DEBUG"
name="com.my.test">
<associated-destinations>
<destination-ref
association-type="LOG"
name="TraceFile"/>
</associated-destinations>
</log-controller>
</log-controllers>
</log-configuration>
java code:
private static final Location loc =
Location.getLocation("com.my.test.TestLogger");
loc.debug("MESSAGE LOGGED!");
Thanks for all the help.
The problem is fixed:
code:
private static Location logger = Location.getLocation(MyClass.class);
In Visual Admin:
Kernel -> LogManager
I set:
ForceSingleTraceFile: NO
DefaultTraceFile_Pattern: /home/myapp/myapp.trc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ray,
with the Visual Admin tool you should check whether you see your locations in the locations tree. Then check the severity that is assigned to them. If this looks ok, then you could reset the ForceSingleTraceFile to the default (don't forget to restart the relevant server node) and check whether your message appears in the defaultTrace.trc file.
It your locations are not visible or don't have the proper severities then you should check whether there are errors during deployment.
Best regards
Alexander
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ray,
I think you forgot to set a category. This way you are setting a trace.
Anyway from the manuals I have this one:
b. Messages with severity DEBUG and PATH must be written as traces only. They must not be written as log messages.
Plus a little excerpt from one of my TechEd sessions:
Since SP4 of SAP J2EE Engine 6.30 (6.40) all trace messages by default go into one single rotating trace file set. It is located inside the /log directory and is displayed in the LogViewer tool under Cluster -> Server XXX -> .\log -> defaultTrace.trc This change involves only trace messages (i.e. ones written through a com.sap.tc.logging.Location object) and not logs (written via Category). It affects application traces as well.
Does that ring a bell?
Hope that helps.
Regards,
Benny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.