How to log exceptions and imp logging info in Portal Service via ILogger?

Hi Experts,
I m trying to use ILogger for my application.
Information about my application:
I have created a Portal Service and exposed it as a Web Service which is deployed as a PAR file on to the SAP J2EE Engine.
I need to use the Logging facility of ILogger in this Portal Service.
I have written the following code in the Init() function of the Portal Service
public void init(IServiceContext serviceContext)
       mm_logger = serviceContext.getLogger("com.persistent.pankaj");
I have put the logger.xml in the logger folder of PORTAL-INF
my logger.xml is as follows:
<Server>
<Logger name="testLog" loggerInterface="com.sapportals.portal.prt.logger.ILogger" locationName="com.sap.portal.testLog" pattern="%d # %20t %15s %m #" isActive="true">
<LoggerClass className="com.sapportals.portal.prt.logger.SimpleFileLogger" level="INFO">
<param filename="logs/com.persistent.pankaj.log" append="true">
</param>
</LoggerClass>
</Logger>
</Server>
On deploying my portal service as a web service
I m unable to get the logs.
I even dont know where will i get the log file, means wat is the exact location where i can check my log results
I m a newbie for this
Please help me out
Help will be rewarded n appreciated
-pankaj

Hi Pankaj,
In your init method try this code to create the logger:
ILogger logger = PortalRuntime.getLogger("testLog");
In your logger.xml the logger name was testLog and not com.persistent.pankaj so while creating logger you should use testLog in the above code.
By default all the logs are written to defaultTrace.log files, to check them read this:
Portal Runtime Logs
If you want to log in a seperate logfile then you should set a seperate log destination, which is not recommended on productive systems due to performance problems.
Also read these to know how to set seperate log destinations:
Netweaver Portal Log Configuration & Viewing (Part 3)
Netweaver Portal Log Configuration & Viewing (Part 1)
Netweaver Portal Log Configuration & Viewing (Part 2)
Regards,
Praveen Gudapati

Similar Messages

  • Logging just exceptions and 'critical' TopLink info to the log

    I'm trying to just log exceptions and other 'critical' info that occur within TopLink to the log rather than getting lots of SQL statements, unit of work info etc.
    I'm running TopLink 9.0.3.5 in WebLogic Server 7.0 (SP4) using container managed persistence for Entity Beans.
    If I startup WebLogic with the toplink.log.level=INFO option then I get SQL statements, unit of work info, JTS registration info as well as any exceptions that are logged.
    If I leave the logging like this my WebLogic log will likely be huge and performance degraded from writing a lot of info that will never be used.
    If I startup WebLogic with the toplink.log.level=NONE option then I don't get any log statements, not even exception info (although obviously clients still get the exception stack). I need to get the exceptions and 'critical' TopLink info in the WebLogic log because I cannot rely on getting the information from client logs.
    In the TopLink for WebLogic 2.5.1 product the default logging behaviour was to log only exceptions and other 'critical' info to the log.
    Is there a way to configure TopLink 9.0.3 so that only exceptions and any other 'critical' TopLink information is written to the log (and SQL statements, unit of work info and JTS registration info is not written).
    Thanks.

    You don't mention which version of 10g you have but there is a bug in all versions 10.1.2.0.2 and newer in that usernames are no longer being inserted in the Apache log files when portal pages are viewed. It was somewhat hit or miss before, but good enough to get a feeling of what was being used Now, it does not even provide that. Bug number reference from Metalink is 5638057. It is shown as "Closed -- not feasible to fix", but will be addressed in 11.0
    I am experimenting with getting this data a couple of ways. One, if you happen to use WebTrends, you can manually set the authenticated users field to whatever you'd like so I am using the API's to retrieve the username and the user company (organization) and concatenating them together.
    The other option I am considering is a procedure call in the footer of each page that automatically updates a new table with the session id, username, page, timestamp, and whatever other information you may want each time the page is visited. This table can then be dumped to a data file if desired or left in the database and analyzed using a tool like Discoverer.
    Rgds/Mark M.

  • I have just installed a new yahoo messenger acc on my iphone, and cannot log in, getting...user underage message.. how do i log in and stay logged in on my iphone5

    i closed and installed a new yahoo messenger acc on my iphone5 last night, and are unable to log onto it now, i get a ....user ungerage.. please try again message continuously, how do i get logged in and stay logged in on my iphone thanks

    You might receive more assistance from users in the Lion forum.
    Click here  https://discussions.apple.com/community/mac_os/mac_os_x_v10.7_lion?view=discussi ons
    Then click New / Discussion / Lion

  • Cisco Supervisor Desktop show "Agent Logs - call" and "Agent Logs - state" in N/A ::: UCCX 8.5.1

    Hi team.
    The Cisco Supervisor Desktop don't show any logs in the "Agent Logs - State" and "Agent Logs - Call" in some agents.
    I restarted the Cisco Desktop Services in CCX Serviceability but the issue continue.
    I appreciate any help respect this case.
    Thanks a lot.
    ErnestoG

    Hi Ernesto,
    Did you click or selct the Specific Agent\Inbound call which is currently being handled by the Agent. From the Screenshot you have attached (first one) doesn't look like the call has been selected.
    Please select or click on that Specific Agent\Inbound call from CSD and check these values.
    Hope this helps.
    Anand
    Please rate helpful posts !!

  • Pros and cons between the large log buffer and small log buffer?

    pros and cons between the large log buffer and small log buffer?
    Many people suggest that small log buffer (1-3MB) is better because we can avoid the waiting events from users. But I think that we can also have advantage with the bigger on...it's because we can reduce the redo log file I/O...
    What is the optimal size of the log buffer? should I consider OLTP vs DSS as well?

    Hi,
    It's interesting to note that some very large shops find that a > 10m log buffer provides better throughput. Also, check-out this new world-record benchmark, with a 60m log_buffer. The TPC notes that they chose it based on the cpu_count:
    log_buffer = 67108864 # 1048576x cpuhttp://www.dba-oracle.com/t_tpc_ibm_oracle_benchmark_terabyte.htm

  • High redo, log.xml and alert log generation with streams

    Hi,
    We have a setup where streams and messaging gateway is implemented on Oracle 11.1.0.7 to replicated the changes.
    Until recently there was no issue with the setup but for last few days there is an excessive amount of redo and log.xml and alert log generation, which takes up about 50gb for archive log and 20 gb for the rest of the files.
    For now we have disabled the streams.
    Please suggest the possible reasons for this issue.
    Regards,
    Ankit

    Obviously, as no one here has access to the two files with error messages, log.xml and alert log, the resolution starts with looking into those files
    and you should have posted this question only after doing this.
    Now no help is possible.
    Sybrand Bakker
    Senior Oracle DBA

  • HT1527 Whenever I try to redeem a card or access my account I get a message "connection manager invoke failed to find service connection url".  I reset my password, logged out and tried logging back in, same message.  How do I solve this issue?

    Whenever I try to log in to my account or redeem gift cards, I get a message saying "Connection Manager Invoke Failed to find a service connection url".  I changed my password, logged out and the same thing keeps happening.  Does anyone have a solution for this?

    Hello,
    Try to go to the settings on your phone... Settings > Store > Click your Apple ID: And sign out from your account, then sign in again .... This solved the problem for me on my iPhone 4s

  • Azure logging - how do you view and monitor logs?

    Hi,
    My question is not specific about logging or specific about storage, so I figured it's best fitted in here. 
    Currently we log either using System.Diagnostics or from frameworks like log4net and nlog. From various cloud services and web sites. Logs are transferred automatically by Azure to Azure tables. This seems fine, I like to write to file sync at runtime and
    have the data transferred by another process. 
    But as services and webs grow, having to search and such in Azure tables are a pain to say the least. Also I completely lack some monitoring and alert facility (you know "if ERROR from SERVICE1 send email to ADMIN" stuff). What to do? I can write
    some code that collects logs from Azure Tables and saves them into a database and go from there. But this is a task I would rather not perform (boring, costly, etc). 
    What do you guys do? Do you even use Azure Tables as an intermediate layer - or have you something else to pick up the log files?
    Werner

    Hi,
    I'm using azure table to log diagnostics errors, and using
    azure storage explorer to observe errors, if the data is very large, we could consider use table filter condition to filter the data. 
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to rotate kjs and kxs logs.

    Is there any built-in facilty for rotating the kjs_1_CCS0 and kxs_0_CCS0
    logs?
    or Has anyone writen a script to shut down the servers, rotate the logs and
    start them back up?
    The log file rotation settings only seem to effect the event log (default
    being logs/ias).
    Thanks,
    Rodger Ball
    Sr. Engineer
    BusinessWire

    Hi,
    There is script budled along with iAS for rotating the kjs_1_CCS0 and
    kxs_0_CCS0. What script are you refering to, is it unix shell scripts or any
    perl script that you require to rotate the file ?
    Regards
    Raj
    Rodger Ball wrote:
    Is there any built-in facilty for rotating the kjs_1_CCS0 and kxs_0_CCS0
    logs?
    or Has anyone writen a script to shut down the servers, rotate the logs and
    start them back up?
    The log file rotation settings only seem to effect the event log (default
    being logs/ias).
    Thanks,
    Rodger Ball
    Sr. Engineer
    BusinessWire

  • Urgent: Huge diff in total redo log size and archive log size

    Dear DBAs
    I have a concern regarding size of redo log and archive log generated.
    Is the equation below is correct?
    total size of redo generated by all sessions = total size of archive log files generated
    I am experiencing a situation where when I look at the total size of redo generated by all the sessions and the size of archive logs generated, there is huge difference.
    My total all session redo log size is 780MB where my archive log directory size has consumed 23GB.
    Before i start measuring i cleared up archive directory and started to monitor from a specific time.
    Environment: Oracle 9i Release 2
    How I tracked the sizing information is below
    logon as SYS user and run the following statements
    DROP TABLE REDOSTAT CASCADE CONSTRAINTS;
    CREATE TABLE REDOSTAT
    AUDSID NUMBER,
    SID NUMBER,
    SERIAL# NUMBER,
    SESSION_ID CHAR(27 BYTE),
    STATUS VARCHAR2(8 BYTE),
    DB_USERNAME VARCHAR2(30 BYTE),
    SCHEMANAME VARCHAR2(30 BYTE),
    OSUSER VARCHAR2(30 BYTE),
    PROCESS VARCHAR2(12 BYTE),
    MACHINE VARCHAR2(64 BYTE),
    TERMINAL VARCHAR2(16 BYTE),
    PROGRAM VARCHAR2(64 BYTE),
    DBCONN_TYPE VARCHAR2(10 BYTE),
    LOGON_TIME DATE,
    LOGOUT_TIME DATE,
    REDO_SIZE NUMBER
    TABLESPACE SYSTEM
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    GRANT SELECT ON REDOSTAT TO PUBLIC;
    CREATE OR REPLACE TRIGGER TR_SESS_LOGOFF
    BEFORE LOGOFF
    ON DATABASE
    DECLARE
    PRAGMA AUTONOMOUS_TRANSACTION;
    BEGIN
    INSERT INTO SYS.REDOSTAT
    (AUDSID, SID, SERIAL#, SESSION_ID, STATUS, DB_USERNAME, SCHEMANAME, OSUSER, PROCESS, MACHINE, TERMINAL, PROGRAM, DBCONN_TYPE, LOGON_TIME, LOGOUT_TIME, REDO_SIZE)
    SELECT A.AUDSID, A.SID, A.SERIAL#, SYS_CONTEXT ('USERENV', 'SESSIONID'), A.STATUS, USERNAME DB_USERNAME, SCHEMANAME, OSUSER, PROCESS, MACHINE, TERMINAL, PROGRAM, TYPE DBCONN_TYPE,
    LOGON_TIME, SYSDATE LOGOUT_TIME, B.VALUE REDO_SIZE
    FROM V$SESSION A, V$MYSTAT B, V$STATNAME C
    WHERE
    A.SID = B.SID
    AND
    B.STATISTIC# = C.STATISTIC#
    AND
    C.NAME = 'redo size'
    AND
    A.AUDSID = sys_context ('USERENV', 'SESSIONID');
    COMMIT;
    END TR_SESS_LOGOFF;
    Now, total sum of REDO_SIZE (B.VALUE) this is far less than archive log size. This at time when no other user is logged in except myself.
    Is there anything wrong with query for collecting redo information or there are some hidden process which doesnt provide redo information on session basis.
    I have seen the similar implementation as above at many sites.
    Kindly provide a mechanism where I can trace which user is generated how much redo (or archive log) on a session basis. I want to track which all user/process are causing high redo to generate.
    If I didnt find a solution I would raise a SR with Oracle.
    Thanks
    [V]

    You can query v$sess_io, column block_changes to find out which session generating how much redo.
    The following query gives you the session redo statistics:
    select a.sid,b.name,sum(a.value) from v$sesstat a,v$statname b
    where a.statistic# = b.statistic#
    and b.name like '%redo%'
    and a.value > 0
    group by a.sid,b.name
    If you want, you can only look for redo size for all the current sessions.
    Jaffar

  • How-to access username and password protected Java EE Web services from ADF

    The title of this post is exactly the same as this article by Frank Nimphius:
    http://www.oracle.com/technology/products/jdev/howtos/1013/protectedws/access_protected_web_services_from_adf.htm
    The article addresses the problem of securing web services using usernames and passwords, when those web services are accessed through a proxy or a data control. In the examples, the user names and passwords are specified, whether in the code or the definition of data controls. (SKING/SKING).
    In a very common scenario, users login to reach a page, for example, A.jspx, which contains a button that calls a web service, for example displayDate. Suppose that user has logged in by username/pass of (AHUNOLD/AHUNOLD) and AHUNOLD has access to the service and the page. Is there any way to pass the logged in user name and password to the webservice ? Of course we can hard-code the username in the data control definition or proxy code, but this is just one of the thousands of users who have access to the service and the authentication is not dynamic this way.
    Hope my question is clear. Wishing you all a great Christmas.
    Farbod

    Hi Frank, and happy new year.
    Are you implying that it couldn't be done declaratively? What is your suggestion for this problem? You know the problem... As I described:
    - I need to secure my web services, so when exposed, no one from inside network or the internet, can access the web service without proper permission
    - The web services are shown as web controls on jspx pages. The user has logged in before reaching the page. It is irrelevant to ask him to enter user name and password again.
    - I have user names, passwords and roles in Oracle Internet Directory (Identity Management). It provides some APIs and I can retrieve the usernames and attempt logging in programmically. But how can I get username and password from the session in ADF application?
    I guess using SAML or certificate could be the solution, but I have a problem with SAML, described here:
    Re: Webservices Security, SAML, and Identity Management (OID)
    Best Regards,
    Farbod

  • How to pass username and password while invoking a web service through wsdl

    Hello All,
    i am calling a web service through wsdl, but it is giving error 401. i want to know how to pass userid and password when i am invoking webservice?
    i am using NetBeans 6.1.
    i did following thing:
    First i created one web application, then i right clicked on project new->web service client, and gave the url for my wsdl.
    after that i create one main class and try to call my required operation by that wsdl.
    Thanks in advance

    Thanks dumchikov, i tried the same thing what ever you told but there is no option for security.
    when i right clicked on web service reference its open 1 window which have 2 tab one is quality of service and second is wsdl customization, then i clicked on wsdl customization. which contain Global Customization, Port Types, Port Type Operations, Port Type Faults, Binding, Binding Operations, Services, Ports and External Binding Files. it don't have security option.

  • How to find the JAR files of a custom portal service?

    Hi all,
    I have created and deployed a custom protal service on to the portal. Now for any of the other apps to make use of this service, i need the JAR files which correspond to this portal service. Where do I find them??
    Regards,
    Narahari
    Message was edited by: Narahari Vedula

    Hi,
    Can you check up if this is located in the following path.
    System Administration ->Support->Portal Runtime
    Here navigate to ROOT/WEB-INF/portal/portalapps
    Open the folder with the name of the par file and check up if you can locate the jar.
    Regards,
    Harish
    (Please award points in case this helps)

  • How to delete diagnostic and utilization logs on ios 5

    Does anyone know how to delete the incredible amount of diagnostic logs that appear every day after i've updated iphone4 to ios5? They refer mainly to low memory and app crashes issues. There should be an easy way to do that, but I didn't find it. Maybe a suggestion to Apple for the next ios update...

    Hi everyone!
         Well, my case is that this doesn't resolved my situation. With iOS 5.0.1 they were deleted when I synced my iPhone 4S with iTunes, but with the latest update, it doesn't happen anymore. It just keeps building up and right now I'm out of memory! I've tried almost everything that I found here, but nothing works; just the files of Low Memory on my phone got deleted, but awdd are still there and are more than 200. Can someone help me please? I love and know tecnology, but this one got me between the sword and the wall.

  • Cut paste wed address still there after logging out and then logging back in. clearing history does not delete it

    After I highlight, copy and paste info into search box look at what I want, after leaving firefox and after manually deleting history and leaving firefox with setting to delete history upon leaving, when I re-enter firefox with cursor in search box right click and old info is still there. I also made sure to clear search history.Doesn't matter what website yahoo google, google maps, put cursor in search box right click and it's still there.
    Thanks.

    It is possible that there is a problem with the formhistory.sqlite file that stores the "Saved Form" data.
    Try to rename or delete formhistory.sqlite and other possible formhistory.* files like formhistory.sqlite-journal and formhistory.sqlite-corrupt in the Firefox profile folder.
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)

Maybe you are looking for