Per portal logs via log4j

Here is my current setup:
mydomain
myApp
aPortal
bPortal
cPortal
logs
log1
log2
Before I had the log4j.xml in the mydomain directory where it was specified in a config and it worked fine. Now that I have 3 portals, all running different versions of the same codebase, the logs are getting thrown together. What I would like is for each portal to have its own logs.
It would look something like this
mydomain
myApp
aPortal
log1
log2
bPortal
log1
log2
cPortal
log1
log2
I've tried putting log4j.xml in aPortal/WEB-INF/classes and log4j.jar in aPortal/WEB-INF/lib but it doesn't seem to pick it up.
Filtering based on Logger doesn't work because like I said, they are different versions of the same code. As far as I understand they run in separate JVM's so this should be possible.
Does anyone know how I could do this? Any help would be greatly appreciated.
Ben

It's all on the same machine. I assumed they run in different VM's because we don't see any collisions among the same classes across the different portals. That being said, I don't know. I wasn't the one to set it up, I'm guessing that it is pretty close to stock 8.1.
Are you suggesting that on creating the logger I do something like getLogger(aPortal + this.getClass())?
This may work, and given that I can't find anything else I'll give it a shot. What I would really like is something that I can transfer around. Have each portal contain its on log files, and the configs to create those. Then I could deploy them to a production system without any changes.

Similar Messages

  • 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

  • What is better Java Logging or Log4J?

    What is better Java Logging or Log4J and why?

    for my money, log4j has the edge, largely because it doesn't keep a lock on log files when they're not actually being written to. but on the downside, it's another third-party library you have to use. then again, every project I've worked on recently has had it imported anyway via some other third-party library like Spring or Hibernate, so it's there anyway
    but only you can answer "which is more suitable for me"

  • Portal logs location ?

    Hi all,
    I`m new to Netweaver and EP 6 and developing a Application for the EP in Java. My iView is working an even my database connection seems to work.
    But my problem is that i have used the Portal Logger from PortalRuntime.getLogger(xxx) and now i`m trying to find my logs.
    I configured the logger to place the logs in logs/app.log with :
    <?xml version="1.0" encoding="UTF-8"?>
    <Server>
      <Logger name="applog" loggerInterface="com.sapportals.portal.prt.logger.ILogger" locationName="app.logger" isActive="true" pattern="%d # %20t %15s %m #">
        <LoggerClass className="com.sapportals.portal.prt.logger.SimpleFileLogger" level="ALL">
          <param filename="logs/app.log" append="false" limit="800000"/>
        </LoggerClass>
      </Logger>
    </Server>
    But where are my logs ? I scanned the whole disc for this log. They are not next to the default.trc (looked via Portal Log Viewer and on my disc).
    Do i have to activate anything for this
    ? I had a look into the other logger configuratiosn from the portal and they are all activated but none of the loggs are shown.
    In the default.trc only my exceptions are shown.
    Best Regards,
    Odo

    Hi,
    Your file destination will have no effect and all the messages will be logged in the [...]/log/defaultTrace.trc file. Once you deploy ur application, a new location is created, with the name "com.sap.portal.app.name." You've got to configure its level (e.g. ALL) using the Log Configurator Service in the J2EE Visual Administrator, otherwise no message will be logged (i.e. the logger is not active by default).
    In your app code, you can use the portal runtime to get the logger. You can then use the logger.
    import com.sapportals.portal.prt.runtime.*;
    import com.sapportals.portal.prt.logger.*;
    pubic class YourClass {
      private static final ILogger logger = PortalRuntime.getLogger("app.name");
      public void aMethod() {
        logger.info("A sample INFO message.");
    Use the LogViewer Service in J2EE Visual Admin to view ur logs.
    hope this helps.
    regards,
    Rohin Aggarwal

  • ESA want to retreive logs via cli

    hi,
    i want to retrieve  message tracking logs via cli
    Can some body let me know the procedure

    Retrieve as in FTP copy them?  Or retrieve as in setup syslog to push the logs off to a local syslog server?
    Message tracking cannot be retrieved from CLI.  Only the mail_logs --- which are used to compile the message tracking DB on the appliance(s).
    From the User Guide, 34-36:
    Tracking logs record information about the email operations of AsyncOS. The log messages are a subset of the messages recorded in the mail logs.  The tracking logs are used by the message tracking component to build the message tracking database.
    If you are trying to get the mail_logs...
    You'll need to configure your logs via CLI: 'logconfig' or GUI: System Administration -> Log Subscriptions.  Edit, or suggested to create a new/copy of the log you are needing off-appliance, and set the push as needed per your environment ---
    From the User Guide, 34-6:
    Log Retrieval Methods
    Log files can be retrieved based upon one of the following file transfer protocols. You set the protocol while creating or editing the log subscription in the GUI or via the logconfig command during the log subscription process.
    Log Transfer Protocols
    Manually Download
    This method lets you access log files at any time by clicking a link to the log directory on the Log Subscriptions page, then clicking the log file to access. Depending on your browser, you can view the file in a browser window, or open or save it as a text file. This method uses the HTTP(S) protocol and is the default retrieval method.
    NoteUsing this method, you cannot retrieve logs for any computer in a cluster, regardless of level (machine, group, or cluster), even if you specify this method in the CLI.
    FTP Push
    This method periodically pushes log files to an FTP server on a remote computer. The subscription requires a username, password, and destination directory on the remote computer. Log files are transferred based on a rollover schedule set by you.
    SCP Push
    This method periodically pushes log files to an SCP server on a remote computer. This method requires an SSH SCP server on a remote computer using the SSH1 or SSH2 protocol. The subscription requires a username, SSH key, and destination directory on the remote computer. Log files are transferred based on a rollover schedule set by you.
    Syslog Push
    This method sends log messages to a remote syslog server. This method conforms to RFC 3164. You must submit a hostname for the syslog server and choose to use either UDP or TCP for log transmission. The port used is 514. A facility can be selected for the log; however, a default for the log type is pre-selected in the dropdown menu. Only text-based logs can be transferred using syslog push.
    If you are wanting to just copy over a specific set of logs for a one-time review or to provide... then, assure that FTP is enabled on the interface.  Then, using standard CLI from your desktop - ftp <IP/hostname>.  You'll be in the /configuration directory when you finish authenticating onto your appliance.  After - just simply use standard FTP commands to retrieve the log files you are after.
    Ex.
    $ ftp myesa
    Connected to myesa.
    220 myesa.local Cisco IronPort FTP server (V8.0.1) ready
    Name (myesa:robsherw): admin
    331 Password required.
    Password: 
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    227 Entering Passive Mode (XXX,16,6,165,16,243)
    150 Opening ASCII mode data connection for file list
    drwxrwx---   4 root     config       1024 Apr 25 10:02 configuration
    drwxrwx---   2 root     config        512 Jun  2  2013 captures
    drwxrwx---   2 root     config        512 Jun  2  2013 diagnostic
    drwxrwx---   2 root     log           512 Apr 25 09:58 upgrade_logs
    drwxrwx---   2 root     log          1024 Apr 25 09:58 authentication
    drwxrwx---   2 root     log           512 Apr 25 09:58 system_logs
    drwxrwx---   2 root     log           512 Apr 25 09:58 cli_logs
    drwxrwx---   2 root     log           512 Apr 25 09:58 trackerd_logs
    drwxrwx---   2 root     log           512 Apr 25 09:58 reportd_logs
    drwxrwx---   2 root     log           512 May  2 15:35 slbl_db
    drwxrwx---   2 root     log           512 Apr 25 09:58 ftpd_logs
    drwxrwx---   2 root     log           512 Apr 25 09:58 euq_logs
    drwxrwx---   2 root     log           512 Apr 25 09:59 updater_logs
    drwxrwx---   2 root     log           512 Apr 25 09:59 euqgui_logs
    drwxrwx---   2 root     log           512 Apr 25 10:01 reportqueryd_logs
    drwxrwx---   2 root     log           512 Apr 25 10:02 mail_logs
    drwxrwx---   2 root     log           512 Apr 25 10:02 status
    drwxrwx---   2 root     log          1024 Apr 25 10:02 asarchive
    drwxrwx---   2 root     log           512 Apr 25 10:02 bounces
    drwxrwx---   2 root     log           512 Apr 25 10:02 error_logs
    drwxrwx---   2 root     log          1024 Apr 25 10:02 avarchive
    drwxrwx---   2 root     log           512 Apr 25 10:02 crash_archive
    drwxrwx---   2 root     log           512 Apr 25 10:03 sntpd_logs
    drwxrwx---   2 root     log           512 Apr 25 09:59 gui_logs
    drwxrwx---   2 root     log          1024 Apr 25 10:04 scanning
    drwxrwx---   2 root     log           512 Apr 25 10:04 antispam
    drwxrwx---   2 root     log           512 Apr 25 10:04 repeng
    drwxrwx---   2 root     log           512 Apr 25 10:04 antivirus
    drwxrwx---   2 root     log           512 Apr 25 10:04 encryption
    drwxrwx---   2 root     log           512 Jan 23 10:55 domain
    drwxrwx---   2 root     log          1024 Feb 27 21:21 domain_3
    drwxrwx---   2 root     log           512 Jan 23 10:55 domain_2
    drwxrwx---   2 root     log           512 Apr 25 09:58 slbld_logs
    drwxrwx---   2 root     log           512 May  2 15:35 slbl_isq_db
    drwxr-xr-x   3 root     log           512 Feb  6 00:00 periodic_reports
    drwxrwx---   2 root     log           512 Apr 25 09:58 snmp_logs
    You can then use standard FTP/UNIX commands to navigate through the directory structure, cd mail_logs, for example and mget the files.
    Ex.
    ftp> cd mail_logs
    250 CWD command successful.
    ftp> ls
    227 Entering Passive Mode (XXX,16,6,165,13,125)
    150 Opening ASCII mode data connection for file list
    -rw-rw----   2 root     log       1399268 May  6 15:33 mail.current
    -rw-rw----   2 root     log       1399268 May  6 15:33 [email protected]
    -rw-rw----   1 root     log        145117 Feb 10 11:58 [email protected]
    -rw-rw----   1 root     log        167043 Feb 11 12:03 [email protected]
    -rw-rw----   1 root     log       1943018 Mar  4 14:14 [email protected]
    -rw-rw----   1 root     log       2404319 Feb 27 09:40 [email protected]
    -rw-rw----   1 root     log       1822273 Mar 20 11:58 [email protected]
    -rw-rw----   1 root     log          1267 Mar  4 14:40 [email protected]
    -rw-rw----   1 root     log       3415936 Apr 24 12:55 [email protected]
    -rw-rw----   1 root     log         67740 Mar 24 16:48 [email protected]
    -rw-rw----   1 root     log         70220 Feb  7 15:29 [email protected]
    226 Transfer Complete
    ftp> mget mail.@*
    mget [email protected] [anpqy?]? a
    Prompting off for duration of mget.
    227 Entering Passive Mode (XXX,16,6,165,180,210)
    150 Opening Binary mode data connection for file '[email protected]'
      2% |*** 
    And so it will copy those off...
    Once complete - the files will now be in the directory on your local desktop.
    I hope this helps!
    -Robert
    (*If you have received the answer to your original question, and found this helpful/correct - please mark the question as answered, and be sure to leave a rating to reflect!)

  • Portal log files

    where do I find the activity logging files?
    Thanks

    Here are my setting via the Logging tab in PSConsole:
    Log Viewer
    Search Criteria: Nothing comes up in the drop down after I select my instance
    Common Logger Settings
    General:
    Log Level: SEVERE
    Default Handler: n/a
    File Handler Properties
    File Pattern: n/a
    File Count: blank
    Append: TRUE
    Filter: blank
    Formatter: n/a
    Other:
    Custom Handlers: blank
    Use Web Container Log File: Radio button to use portal log files is selected
    Specific Logger Settings
    No Loggers in the List

  • How to access Portal Logged in user in Web Service application

    Hi Experts,
    I have created one Deployable Proxy and based on that i have created Web Based (WAR) project. to consume the proxy i have created Servlet based java file which invokes Web services. Based on this WAR project i created EAR application which deploys on J2EE server.
    I am facing issue while accessing Portal Logged in user in my Servlet Class in WAR project so can  you please provide inputs for how we can access Portal Logged in user in our Servlet class? also how we can access LDAP detailes of portal Logged inuser ?
    I tried to fetch the Logged in user from servlet request but i can't access it giving me null value. Following is the method details that i am using in my servlet.
    protected void doGet(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException                
    IUser user = UMFactory.getAuthenticator().getLoggedInUser();
    String strName = user.getFirstName();
             If I checked in LDAP values First name for logged in user is present but in my code its giving Null value.
    Can you please provide your inputs on above issue.
    Regards,
    Rahul

    have you found a solution this problem yet?

  • Want to Generate custom logs with Log4J within Java Embedding activity

    Hi Gurus,
    i want to Generate custom logs with Log4J within Java Embedding activity. For that i have performed some steps, but the log file has not been created.
    ServerSide Configuration:
    *===============*
    1. I have copied the log4j-1.2.15.jar file to the "oracle.soa.ext_11.1.1" location and recreate the oracle.soa.ext.jar file using an-script, which appends the log4j.jar file to the classpath.( That was created successfully)
    2. Specify a File location in log4j.xml for creating the log file. (e.g. (<middleware_home>/config/customLog.log)
    3. Then create a folder and add log4j.xml and log4j.dtd file under the folder.
    4. Modify the startManagedWeblogicServer by adding JAVA_OPTIONS="-Dlog4j.configuration=<middleware_home>/config/log4j.debug.xml”
    5. Then restart the SOA server.
    log4j.xml :
    I have used fileAppender.
    DevelopmentSide Configuration:
    *===================*
    1. Create synchronous BPEL process and Add "JAVA Embedding Activity" inbetween receiveInput and replyOutput activity.
    2.Import the log4j-1.2.15.jar to the project libs
    3.In the BPEL source code, import the Logger class.
    4.Insert the code in the JAVA Embedding Activity
    Logger logger = Logger.getLogger("CustomLog");
    logger.info("CustomeLog " + getTitle());
    Compile and deploy the project into the SOA_server and test it. Test status is completed but log is not created in the mentioned location.
    Ref: http://blog.andrade.inf.br/search/label/Log4j
    Is there any other way to achieve this requirement. Please suggest.
    Thanks in Advance,
    Sharmistha

    You can try this.
    http://veejai24.blogspot.co.uk/2008/04/simple-way-to-implement-log4j-in-your.html
    Thanks,
    Vijay

  • Enterprise Portal Log off Issue for External User

    Hello
    We are facing a Enterprise Portal log off issue for one of our external users.
    User is logged in and clicks on the "Log Off" link .
    User is prompted as seen below:
    Are you sure you want to logg off?
    Choose Yes or No
    Click on Yes and popup window goes away and nothing else happens.
    These problems logg off issue problem happening on Internet Explorer 6 but from from firefox browser, its working.
    Also  popups are not blocked on IE.
    EP version with SP level is EP 7.00 SP12.
    Even though from Internet explorer 6, i can log in and log off with internal user.
    Please advise for the log off problem .

    Hello
    I added the value ume.logoff.redirect.url =https://poqwas.synenco.com/irj/portal
    on Config Tool Global Paramter settings.
    Then restart the server.
    But I am getting the same problem.when I login with external user ID, then make log off. Nothin Happen...
    Please advise

  • Maximum number of events per audit log file must be greater than 0.

    BOE-XI (R2)
    Windows Server 2003
    Running AUDIT features on all services.
    Report Application Server (RAS) keeps giving the following error in the Windows Application Event Log.
    Maximum number of events per audit log file must be greater than 0.  Defaulting to 500.
    I am assuming that this is because the RAS is not being used by anyone at this time - and there is nothing in the local-audit-log to be copied to the AUDIT database.
    Is there any way to suppress this error...?
    Thanks in advance for the advice!

    A couple more reboots after applying service pack 3 seemed to fix the issue.
    Also had to go to IIS and set the BusinessObjects and CrystalEnterprise11 web sites to use ASP .NET 1.1 instead of 2.

  • EP log type INFO not written to the portal.log file

    All the log.info (where log is of type PortalRuntime Logger) statements in my code are not written  to the portal.log file.
    I have configured the portal_logger to log ALL but it seems to log only the FATAL and WARNING messages and not the INFO ones.I am on EP6 SP2
    Thanks
    Sid

    Let me rephrase my question.
    In the portal logs configuration (Sys Adm - Monitoring - Logging Console - portal_logger ) if you select ALL, should it not log messages of all types ( ERROR WARNING INFO )? When I select ALL for the portal_logger the portal.log doesn't display the log messages of type INFO (only the once of type ERROR or WARNING).

  • Integrating a non-Portal system via a web service SSO

    Hi all,
    Hope you could help with this scenario.  There is a request from a client to integrate a non-Portal website into their Portal system via a single-sign on web service.  In particular,
    1.  Portal user will see an iView in the Portal with the following form elements:
         --username field
         --employee ID field
         --submit button
         *there will be no password field because it is already fixed (can be fixed/hardcoded in the web service call)
    2.  Upon clicking the Submit button, the web service call is executed
         --the web service response contains a URL (which is the non-Portal website)
    3.  The Portal automatically displays the contents of the URL in the iView
    Is this a feasible scenario?  What is the best way to implement this?
    Thanks in advance

    Hi Charisse,
    You are going in the right direction. I can give some technical input like you need to create the wsdl and need to create a stub after that using this wsdl and inside this stub all the informations will need to be mentioned.
    Regards,
    Sen

  • Portal - bursting via attribut "e-mail" in InfoObject 0PROJECT

    Hello
    We are facing a problem in SAP Portal.
    Via Infoobject 0PROJECT (with customer display attribut zemail) we intend to burst a workbook to the appropriate user entries in the project.
    After executing we get the error message  in  a separate window: "Bursting: No determination of receiver possible".
    Where can we get the correct settings for this sceanrio?
    Thanks
    Regards
    Chäsitzer

    Hi,
    Check this thread:
    Work book broadcasting
    Regards
    Pcrao.

  • Multiple layouts per portal

    i would like to create a look and feel like amazon.com(and many other sites) with tabs and each tab having different layout.
    since a portal can only have one layout per group, how can this be done.
    i was thinking of having multiple portals and then switch the user to different portals depending on the tab clicked.
    but that is clumsy with all that session information transfering and admin setup.
    i saw in you api that there is something called a category and that you can get a layout using a category as an argument.
    is there going to be native support for multiple layouts per portal? if so, when, next release?

    Hi Thomas,
    you have several options with the portal standard:
    1.) If the user only has one role assigned at a time you can attach the portal layout to the roles. So depending on the role the user has he sees the respective layout - BUT: how to asign the two roles to the user!? This can only be done by admins and I assume that it is no intended to call the admins every time the user needs the other role?
    2.) The entry to the portal is realized with different urls like http://yourportal.com/VIEW1 and http://yourportal.com/VIEW2.
    VIEW1 and VIEW2 are so called portal aliases and you can attach the different layouts to those aliases.
    BUT: the two roles have nothing to do with the aliases so you still have the problem of role assignment.
    3.) Each person gets two users with each user assigned to one role and one layout assigned to the user or group or role...
    Anyhow: I would ask the people who brought up the idea of two different layouts - WHY?? A portal is ONE single point of entry for EVERY application and information a user needs. So why two different layouts? And what, if five others are coming each bringing their own layouts, too?
    4.) If you really want to have different layouts each time a different top-level navigation point is active you have to program your own portal component. That would fit your needs but is besides standard.
    Hth,
    Michael

  • Logging with log4j

    I'm having a problem doing logging. The problem lies in my log4j.properties file. I want to the log to be in the WEB-INF directory. Here's a log file that works
    log4j.rootLogger=info, R
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=${catalina.home}/logs/clprservicing.log
    log4j.appender.R.MaxFileSize=10MB
    log4j.appender.R.MaxBackupIndex=10
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    log4j.logger.org.apache.catalina=INFO, RThis properties file is in WEB-INF/classes where it should be. When I change the location of the log to WEB-INF in the following log file
    log4j.rootLogger=info, R
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.logfile.File=${clpr-servicing.root}/WEB-INF/clprservicing.log
    log4j.appender.R.MaxFileSize=10MB
    log4j.appender.R.MaxBackupIndex=10
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    log4j.logger.org.apache.catalina=INFO, Rit doesn't work! The webapplication is called clpr-servicing. Is there something wrong with the key ${clpr-servicing.root}? Does it have to be defined somewhere?

    Never mind. I found the solution.

Maybe you are looking for

  • Error with variable substitution..

    Hi I am getting following error message for variable substitution *Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The

  • Rollback to the older format?

    I am not happy with the new look and feel of the Apple support discussions group. It is very app-y like and its not friendly to older PCs/Macs or a slow Internet connection, like an inferior Verizon Mobile Broadband, where recently I am only getting

  • ADF and WebCenter 11g libraries upgrade paths for WLS 12.1.3

    We want to upgrade one of our WLS from 10.3.6 to 12.1.3. (1) The application hosted on this instance uses the following ADF and WebCenter libraries (also deployed on the same WLS). Please confirm if these can be deployed in WLS12c without any changes

  • Where can I get WinXP SATA driver for Satellite L30?

    I have a Satellite L30-10X with preinstalled Windows Vista and plan to downgrade OS to Windows XP Pro, but it needs special SATA driver at the early installation phase. Going to create an "unattended" Windows distributive using nLite, but cannot find

  • Why won't tracks show as purchased between regular and deluxe albums

    I purchased a couple songs from a deluxe album but they do not show as purchased on the regular version of the same album. I want to but a 'complete my album' but don't want the deluxe version, only the regular one. Is there any way to fix this??