Custom logging in OSB

I want to create a common proxy service in OSB which can be called by other services for logging body, fault etc. I intend to log to three different channels : File, Queue & Database. Now the approach is
1. While executing any OSB process, accept a "logDestination" input from the user.
2. Within the OSB process, just do a service callout to the common OSB Logging proxy service.
3. Logging OSB proxy service will read the "logDestination" value and based on that route to a
file proxy service, queue proxy service etc to write logs to respective channels.
Will this work? I tried doing this but i am unable to create and read the "logDestination" value in my common OSB logging proxy service (its in a different project).
Need help in doing this. Thanks!

>
Can you please suggest a better approach ?
>
Well, I don't know your requirements, but concerning logging I'm quite sure that client can't (and shouldn't) decide where to log in service implementation. In other words, you should decide whether to log in file, queue or db in proxy service flow and without any explicit client input.
>
The problem I am facing is that I am unable to propogate the value of "logDestination" to my OSB logging proxy service. In addition to this variable value I also need to propogate the $body of the OSB process to my common logging service.
I hav a service callout (within the stage error handler) from the OSB process to my common service. How can i propogate all the above mentioned details to the common service at the same time ? I am pretty new to OSB, so plz excuse me if thats a basic question.
>
It seems you are not asking this question for the first time. :-)
How to call a OSB proxy service from a different OSB process?
I hope my answer in that thread should help you.

Similar Messages

  • Logging in OSB

    Hello,
    Can I have separate log files for each project in OSB ?
    If yes, then please give me the steps to do so.
    thanks,
    salil

    Salil,
    I have configured the same using below post :
    http://www.yenlo.nl/nl/custom-logging-in-osb-using-java-call-out/
    Separating logs in OSB based on project - is this possible?
    http://www.javamonamour.org/2011/07/osb-and-log4j.html
    Regards,
    Abhinav Gupta

  • How to configure JCA DBAdapter logging in OSB 11.1.1.4.0?

    How to configure JCA DBAdapter logging in OSB 11.1.1.4.0?
    I have a project deployed to the new 11.1.1.4.0 version of OSB.
    Under previous versions, a $DOMAIN-diagnostic.log file was maintained and contained a record of the activity of the various JCA DB pollers I had configured.
    In the most recent version, this is not the case.
    I'd like to know if I can restore the old behaviour...
    The best solution I could come up with is to change a setting in $DOMAIN/alsbdebug.xml, thus:
    <java:sb-debug-logger xmlns:java="java:com.bea.wli.debug">
    <java:alsb-jca-framework-adapter-debug>true</java:alsb-jca-framework-adapter-debug>
    </java:sb-debug-logger>
    With this change the pollers put their logging output into the $DOMAIN.log file.
    How can I get the output back into $DOMAIN-diagnostic.log?

    Alex,
    Oracle B2B does not support custom HTTP listening channels as of now. There are below two default HTTP listening channels for async Request-Response scenarios -
    http://host:port/b2b/transportServlet or http://host:port/b2b/httpReceiver
    and below one is used for synchronous request-response scenarios -
    http://host:port/b2b/syncreceiver
    where host - B2B server host and port is B2B server port.
    Regards,
    Anuj

  • Using Log4j2 in weblogic for logging in OSB

    Hi All,
    I was trying to use log4j2 logging in OSB. I did below mentioned steps:
    Copied external jars "log4j-api-2.0-beta7" and "log4j-core-2.0-beta7" into %Domain_Home%\lib directory.
    Placed wllog4j.jar into same location.
    Created log4j2.xml and placed it into %Domain_Home% directory.
    Modified setDomainEnv.cmd in %Domain_Home%\bin directory to include log4j2.xml location(set LOG4J_CONFIG_FILE=%DOMAIN_HOME%\log4j2.xml) and enable log4j logging by setting java option(-Dwlw.log.Log4jLoggingEnabled=true)
    Content of log4j2.xml looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration status="debug" name="MyApp" packages="">
       <appenders>
          <RollingFile name="RollingFile" fileName="C:/Oracle/MiddlewareNew/user_projects/domains/base_domain/servers/AdminServer/logs/services.log" filePattern="logs/$${date:yyyy-MM}/app-%d{yyyy-MM-dd-HH}-%i.log.gz">
             <PatternLayout>
                <pattern>%d %p %m%n</pattern>
             </PatternLayout>
             <Policies>
                <TimeBasedTriggeringPolicy/>
                <SizeBasedTriggeringPolicy size="10 MB"/>
             </Policies>
             <DefaultRolloverStrategy max="10"/>
          </RollingFile>
          <Async name="Async">
             <appender-ref ref="RollingFile"/>
          </Async>
       </appenders>
       <loggers>
          <root level="debug">
             <appender-ref ref="Async"/>
          </root>
       </loggers>
    </configuration>
    After setting all the above things, when i am starting weblogic server then i am getting parsing exception in console with error like below:
    log4j:ERROR Parsing error on line 3 and column 44
    log4j:ERROR Document root element "configuration", must match DOCTYPE root "null
    log4j:ERROR Parsing error on line 3 and column 44
    log4j:ERROR Document is invalid: no grammar found.
    log4j:WARN The <configuration> element has been deprecated.
    log4j:WARN Use the <log4j:configuration> element instead.
    I am not able to figure out what is going wrong here. In my information log4j2 has done away with namespaces, schema/dtd references and looks like still weblogic is using log4j 1.2 reference. I would really appreciate of one can tell me what is going wrong here.
    There was reference to log4j-1.2.8 in my setDomainEnv.cmd as
    set POST_CLASSPATH=%POST_CLASSPATH%;%ALSB_HOME%\lib\version.jar;%ALSB_HOME%\lib\alsb.jar;%ALSB_HOME%\3rdparty\classes;%ALSB_HOME%\lib\external\log4j_1.2.8.jar;%DOMAIN_HOME%\config\osb
    could this be causing issue? If yes then how can we remove old references of log4j 1.2(if i am removing this entry from here then log4j is giving error for classes not found).
    Any input will be helpful.

    The log4j:ERROR messages are not coming from Log4j 2 and are most likely from Log4j 1.x. Somehow Log4j 1.x must be getting the log4j2 configuration.

  • Custom log of rejects in BPC data manager package

    dear All
    we have custom package which loads records from flat file.
    The package is using a stored procedure for all calculations and log errors..
    The error codes are logged for duplicates, invalid member IDs..
    When we tested for small number of records, the log used to display in package view status.
    But if there are huge number of reccords we were unable to display log in the pacakge status. Is there any limitation?
    the error log file ranging from 8Mb to 25MB.
    Please advise.
    BPC 7.5 MS version.
    regards
    Prasad

    hi Roberto
    thanks for your reply.
    yes i am trying to display the log file of private publications only. it consists of rejects with custom logs.
    this is requirement from client, they wantrd to see in package view status itself.. so is why we got stuck
    during testing it was able to display but during uat there were huge rejects where it wasnot able display anthing.
    is there any sap  note so that I can share to client,n or specifications of sap?
    any workaround please advise
    regards
    Prasad

  • 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

  • How to implement custom logging using log4j in Webcenter Portal Application

    I need to implement custom logging and export it to a new log file in Oracle 11.1.1.5 (Webcenter portal application). Please tell me the steps to implement this functionality.

    Please post questions for WebCenter Portal in it's own forum:
    WebCenter Portal

  • Single file custom logging for portal service in 7.31

    Hello Experts,
    I have a portal service.
    The service writes sensitive data to the DB and therefore I need tracing mechanism.
    Until now I've used a custom txt file but now I want to use the SAP J2EE logging infrastructure (for performance, identifying user sessions etc...)
    Since the severity of the messages will be set to 'info' I don't want to write the log entries to 'defaultTrace.trc', I want to write it to a custom file.
    I'm aware of 'ForceSingleTraceFile' parameter but where can I set the logging properties? (in older portals I could use logger.xml in my portal component project and set a custom log file but as far as I understand 'logger.xml' is not supported anymore and its parameters are ignored).
    Where can I find the documentation for setting logging properties for portal service in 7.31?
    J2EE/Portal version is 7.31 SP7.
    Regards,
    Omri

    hi omri,
    please have a look at this documentation (SpecificDestinationLogControllers - http://help.sap.com/saphelp_nw73ehp1/helpdata/de/2b/09343e32ff1033e10000000a114084/frameset.htm)
    regards,
    christian

  • Custom Logging

    Hello,
    I have a simple runbook that I use to delete machines from both AD and Config MGR. I currently run this runbook manually on a weekly basis but would like to make this runbook available to a few more folks. My input for this runbook is a csv and since there
    isnt anything stopping someone from deleting a workstation they shouldn't I would like to do some custom auditing on this runbook. I can very easily pass the date / time, and the machine name and write it to a SQL DB but how do I get who ran the runbook. It
    seems like this should be easy to get but I cant think how. Has anybody out there tried this type of custom logging?

    Hey Rooster,
    When we talk about making automation available to our end users usually it makes sense to put some sort of request system infront of the automation and do detailed logging there. That system then has permissions to invoke Orchestrator (or place a generated
    CSV file in the fileshare location your Orchestrator WF is monitoring)
    Here are some blog posts talking about this.
    http://blogs.technet.com/b/systemcenter/archive/2014/01/14/service-management-automation-and-sharepoint-mvp.aspx
    http://opalis.wordpress.com/2013/04/03/triggering-orchestrator-runbook-from-service-manager/

  • Custom logging formatter not used (XML instead).

    I use the built in Java logging API to write log messages to a file. As the SimpleFormatter does not quite the format we would like to have, I wrote a custom formatter and set it in the logging properties file:
    java.util.logging.FileHandler.formatter = my.LogFormatter
    This works well in a standalone application. But using the same in my servlet application, the log fie does not use my custom formatter but the (default?) XML formatter. I multichecked the JAR that is in cluded in the WAR file and it has my custom LogFormatter class (as the JAR is exactly the same that works in the standalone application).
    Does the servlet expect a custom logging formatter somewhere else? I tried adding it to the root directory within the WAR but this also doesn't work.

    By default, the LogManager reads its initial configuration from a properties file "lib/logging.properties" in the JRE directory.
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogManager.html

  • Display link if wholesaler logged in or alternate link if customer logged in?

    Hi,
    I have a website that sells products to customers and wholesalers.
    I have setup a separate secure area for both the customer and the distributor. (to view past orders/specials etc)
    In top right of my site - they can click a "Login/Register" button that takes then to the login / registration page.
    Here they login as a customer (or if a wholesaler they are asked to go to the wholesaler Login Page).
    Once logged in the top right "Login/Register' button changes to a "Hello Name" and an "Account Overview" link.
    The problem is I have to hard code the "Account Overview" link so it can only link to either the customer or wholesaler secure area overview page.
    Is there anyway I can set it to recognize if a Wholesaler or a Customer logs in and display the appropriate link?
    Any help would be appreciated.

    anonymous - See Application Link
    Scott

  • Using log4j to create custom log level in standalone batch application

    Hi all,
    I would like to use Log4j to create a custom log level so that from my standalone java batch process application, whatever error messages I can log to a log file.
    Can any one give me any pointer on this.
    Appreciate any help.

    This doesn't seem to warrant a 'custom level'. Just use Log4J as is... create a Logger object and use its error() or warn() or whatever methods are appropriate for the logging you want to do. I don't understand the reason for the question.

  • Custom Log Handler - Using Database

    Hi,
    Is it right options to store the logs details like logged in user, severity, time stamp and exception message in database, in terms of application efficiency? .. We will be using ADF BC for doing this. Just want to confirm if it will add any overhead to the application expecting the logger will be added in info, sever and fine level as and when required in the code.
    Thanks

    Log4j DB Appender is another option I can think of.
    You can also write your custom Log handler that extends java.util.logging.Handler and write to a DB Table.
    As Timo said try avoiding ADF BC. You will have to deal with transactions. Multiple AMs might slow you down
    Talking about writing to a DB. You have to weigh in the pros and cons based on your application hits, Processing it does, time it takes to insert.....
    DB operations are slower than appending to a file. If you plan to do multiple inserts on every request? It might take a hit on the App.
    If its just one DB insert per request(including redirects)/login. Based on how heavily the App used, I think its ok to write to a DB.
    I know a lot of applications that inserts a record to a table and they just work fine. An additional 30 - 60 millis will not be noticeable (Keep a dedicated connection for this activity).
    You can also think of keeping this activity async, like writing to a queue or appending to a file and have some Background Program process this.

  • Custom Logging - Either via Console or a Tool...

    Anyone know of a way to create custom logs in the Console? I am trying to audit specific events and would like to create a log that would show just those. Anyone know of a tool that logs events such as: failed attempts to read files, delete files, run programs, etc. I use ARD to run usage reports, but a specific tool or ability to log would be awesome. Thanks for any help!

    we use kiwi log viewer (about $30). currently it allows you apply color filters based on words, grep searches, etc., but there's no way to filter out stuff you don't want to see or to only display search results. developer says it's on the roadmap. other options are splunk (no experience, full blown version is very expensive, there's a free version...kiwi is more reasonably priced).
    don

  • Locking Transcation and customized log messages

    Hi
    I wanna to lock a specific transcation and if users are executing the transaction code then a customized log meesage should popup or display and the transaction should terminate. Is there a way to do by std way instead of handeling it in coding? I dont wanna to create authroization objects as it is not a time to experiment with that considering the system landscape complexity.
    thkx
    Prabhu

    Hi,
    Use Authority Check statement.If the authority check fails raise an message.
    Regards
    Krishna

Maybe you are looking for

  • Worst customer service and still on going foir near on 18 months

    I manage the laptop pool in a large private school, we bought 750 x220i's for th student body, we also spent close to $45,000 to buy the extended warranty and next day on site warranty, all was good for the first 12 months, we got what we paid for, t

  • Calculation in a Conditional Formatting

    Do you know if it is possible to create a conditional format based on the result of a calculation? I would like to use a calculation in the field "Value". The instructions to fill this field say: "Type a numeric value or select a value from the drop-

  • "JVM heartbeat .. dead" in trace file - how to diagnose it?

    One of our customers reported, that Java applet hosted on our website (running in Java Plug-In 1.6.0 update 23, Mozilla Firefox 3.6.13) seems to terminate in the same situation each time. This is a signed applet, which is about to estabilish a HTTPS

  • Problems with itunes since updat to 11.1.4

    ever since Itunes upgraded to 11.1.4 I have not been able to use it . it keeps telling me that MediaAccessary.DLL is missing i've tried everything. oi've removes all itunes and apple files about 30 times in the last 2 weeks

  • Is there a turnkey solution?

    I have seen my friends using PC or XBox as video server for their HDTV. I have also read many discussions in this forum about doing the same with the Mac mini. However, these still look like trial and error DIY projects. Is there a turnkey solution f