About Logging

Hi,
I want to use Logging for my application . so i got information about jakara commons-logging and log4j and also i know jdk is having its own loggging mechanism. but i want to choose jakarata commons-logging baseAPI so in future if i want to switch to any other logging mechanism it will be easy.
any body know how to configure this jakarata commons -logging is log4j required.
i know that by placing commons.properties we can specify but where the log file will be generated. where will we specify that property.
Thanks in advance.

What version of the Java libraries are you on? The java.util.logging classes use the console by default, so it's possible it's actually using them. To log to files etc. you need to supply a logging configuration .properties file, use e.g.
-Djava.util.logging.config.file=C:\ScoreCard\ScoreCard\src\slogging.properties
Copy the logging.properties file from the lib/ext directory and modify it.

Similar Messages

  • Qeustions about log on issues

    Now we get a problem about log on for our bc4j+uixml application. In priciple before viewing our website the viewer should sign in. we use dynamic credentials as introduced under this link: http://otn.oracle.com/products/jdev/howtos/bc4j/howto_dynamic_jdbc.html because the user/password pairs are stored in oracle database.
    What a problem we have?
    Before viewing every page Login.uix will be displayed for Log on.By testing if we sign in with right username/password it works and the desired paged will then be displayed.But with false username/password We hope the Login.uix would still be displayed untill log on succeeded. but nothing is displayed.
    What we have done ?
    1.registered oracle.cabo.servlet.loginPage and oracle.cabo.servlet.loggedInKey in web.xml.
    2.We use the two java files introduced in the article above ,and of course we have replace the page LoginForm.jsp with our own Login.uix . And a eventhandler is assigned for the submit button in Login.uix
    Where is the right place to handle the exception if log on failed? in that eventhandler or somewhere else? I hope some people here have also handled such a problem and can give me some suggestion.
    thanks a lot!
    yong

    Hi Yong,
    Getting this behavior should be no problem. What do you return as your EventResult in the case of an invalid login?

  • Info about logging.xml in JDeveloper weblogic domains? JDK Logging Control

    Is there any documentation on the file <DomainDir>/config/fmwconfig/servers/<ServerName>/logging.xml?
    It seems to control JDK 1.4 logging for my weblogic server and overrides settings from the logging.properties file.
    This is important new behaviour!
    Is it documented somewhere?

    I see some message about a proxy. Have you checked that you can use the proxy from you network?
    If not you should turn the proxy off.
    Timo

  • Want to know about Log on Script

    Hi All,
    I am new to SAP, I created a macro but i want to know is there a way to record macro for log on into a particular instance also.
    Like just clicking the script it should automatically take user name and password and enter into particular instance.
    I use sm37 instance.
    if anyone can guide me it will be very good.
    Thanks & Regards,
    subhas

    The SM37 instance cannot be your SID, so I guess it is the transaction (?) and you are wanting to start a program on a remote target host which is not within your same SID?
    You will need to give us more information about which program this is and where it is before we can constructively help you.
    Please also read the forum rules if you have not yet done so, just to be on the safe side of misunderstandings about them..
    Cheers,
    Julius

  • Urgent - Question about logging and debugging.

    Hi,
    I have a question about the logging and debugging supported by
    Weblogic 6.0. From what I understood by reading the documentation
    it has classes e.g. NotCatalogLogger class for logging the information.
    The class has one method callded
    debug() for writing the debugging information. I want to log the
    debug messages only in some situation. Can I control this using
    some property? Because the documentation says that the debug information
    is logged only if application is running in debug mode. Now how
    do I change the mode of an application??
    Thanks and Reagrds,
    Manoj

    Hi,
    I have a question about the logging and debugging supported by
    Weblogic 6.0. From what I understood by reading the documentation
    it has classes e.g. NotCatalogLogger class for logging the information.
    The class has one method callded
    debug() for writing the debugging information. I want to log the
    debug messages only in some situation. Can I control this using
    some property? Because the documentation says that the debug information
    is logged only if application is running in debug mode. Now how
    do I change the mode of an application??
    Thanks and Reagrds,
    Manoj

  • Pls help me: about log in

    Dear all,
    I have a created a dynamic page (PHP and mysql) with log in
    (server vehaviour) page. and after user had enter their username
    and password, if succeed they go to new page. in this new page ,
    they can submit news. and my big problem is (sorry iam new bie) how
    i can get their username in this new page that they had entered in
    log in page, i want to search id_user in tabel1( field: id_user,
    username, password) with their username and after got it , i want
    to insert this id_user into table2 (filed: id_user, no_news,
    date_news, news ). I hope my explaination will be understood. tks 4
    any help....

    I don't need the code, you do. :O) Read the instructions
    below. Replace
    the parts of the code that are bad with parts of the code
    thar are good.
    Let's look at the tutorial/post, posted below in it's
    entirety from
    http://friendsofed.infopop.net/2/OpenTopic?a=tpc&s=989094322&f=8033053165&m=324102421&r=32 4102421#324102421.
    1. Log In User needs changes in two places, plus the removal
    of three
    lines. Find the following lines of code
    $GLOBALS['PrevUrl'] = $accesscheck;
    session_register('PrevUrl');Replace them with
    $_SESSION['PrevUrl'] = $accesscheck;2. Then find
    $GLOBALS['MM_Username'] = $loginUsername;
    $GLOBALS['MM_UserGroup'] = $loginStrGroup;Change them to
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;
    3. Finally, DELETE the following lines
    //register the session variables
    session_register("MM_Username");
    session_register("MM_UserGroup");That's it. You're done with
    your Login
    form. You know need to replace a few lines in your logout,
    but we'll wait
    on
    that.===========================Article========================I
    have
    discovered there is a serious bug with the Dreamweaver MX
    2004 User
    Authentication server behaviors when used in conjunction with
    PHP5.
    Basically, the problem is that the DW server behaviors use
    obsolete code
    that appears to work with PHP4, but breaks once deployed on
    PHP5 (with
    register_globals set to the default off setting).
    I have notified Macromedia of the problem, and they have
    logged it as a high
    severity bug, but have given no indication as to when a patch
    will be
    issued. Fortunately, the solution is easily fixed by hand.
    The server
    behaviors affected are Log In User and Log Out User.
    Log In User needs changes in two places, plus the removal of
    three lines.
    Find the following lines of code
    $GLOBALS['PrevUrl'] = $accesscheck;
    session_register('PrevUrl');Replace them with
    $_SESSION['PrevUrl'] = $accesscheck;Then find
    $GLOBALS['MM_Username'] = $loginUsername;
    $GLOBALS['MM_UserGroup'] = $loginStrGroup;Change them to
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;Finally, DELETE
    the following
    lines
    //register the session variables
    session_register("MM_Username");
    session_register("MM_UserGroup");
    In Log Out User, locate these two lines
    session_unregister('MM_Username');
    session_unregister('MM_UserGroup');Replace them with
    unset($_SESSION['MM_Username']);
    unset($_SESSION['MM_UserGroup']);
    NOTE: There is NO need to do this if you are still using
    PHP4, and not
    experiencing any difficulties with User Authentication.
    However, it does
    affect the instructions for Chapters 14 and 15 of Foundation
    Dreamweaver MX
    2004 for anyone switching to PHP5.
    David Powers
    Co-author: Foundation Dreamweaver MX 2004
    "jangade" <[email protected]> wrote in
    message
    news:[email protected]...
    > Sorry, i still don't understand about that tutorial, can
    u explain me more
    > detail pls ( i am using php triad: php 4, mysql 1.3 and
    apache 1.3 ). i
    > give u
    > the code :
    >
    > login page code:
    > <?php require_once('Connections/koneksi.php'); ?>
    > <?php
    > // *** Validate request to login to this site.
    > session_start();
    >
    > $loginFormAction = $_SERVER['PHP_SELF'];
    > if (isset($accesscheck)) {
    > $GLOBALS['PrevUrl'] = $accesscheck;
    > session_register('PrevUrl');
    > }
    > login page :
    >
    > if (isset($_POST['pemakai'])) {
    > $loginUsername=$_POST['pemakai'];
    > $password=$_POST['sandi'];
    > $MM_fldUserAuthorization = "";
    > $MM_redirectLoginSuccess = "sukses_login.php";
    > $MM_redirectLoginFailed = "tmbhdtteknisi.php";
    > $MM_redirecttoReferrer = false;
    > mysql_select_db($database_koneksi, $koneksi);
    >
    > $LoginRS__query=sprintf("SELECT username, password FROM
    tblteknisi WHERE
    > username='%s' AND password='%s'",
    > get_magic_quotes_gpc() ? $loginUsername :
    addslashes($loginUsername),
    > get_magic_quotes_gpc() ? $password :
    addslashes($password));
    >
    > $LoginRS = mysql_query($LoginRS__query, $koneksi) or
    die(mysql_error());
    > $loginFoundUser = mysql_num_rows($LoginRS);
    > if ($loginFoundUser) {
    > $loginStrGroup = "";
    >
    > //declare two session variables and assign them
    > $GLOBALS['MM_Username'] = $loginUsername;
    > $GLOBALS['MM_UserGroup'] = $loginStrGroup;
    >
    > //register the session variables
    > session_register("MM_Username");
    > session_register("MM_UserGroup");
    >
    > if (isset($_SESSION['PrevUrl']) && false) {
    > $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
    > }
    > header("Location: " . $MM_redirectLoginSuccess );
    > }
    > else {
    > header("Location: ". $MM_redirectLoginFailed );
    > }
    > }
    > ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
    4.01//EN"
    > "
    http://www.w3.org/TR/html4/strict.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > <title>Selamat Datang</title>
    > .......
    >
    >
    >
    > and new page :
    > <?php
    > //initialize the session
    > session_start();
    >
    > // ** Logout the current user. **
    > $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
    > if ((isset($_SERVER['QUERY_STRING'])) &&
    ($_SERVER['QUERY_STRING'] !=
    > "")){
    > $logoutAction .="&".
    htmlentities($_SERVER['QUERY_STRING']);
    > }
    >
    > if ((isset($_GET['doLogout']))
    &&($_GET['doLogout']=="true")){
    > //to fully log out a visitor we need to clear the
    session varialbles
    > session_unregister('MM_Username');
    > session_unregister('MM_UserGroup');
    >
    > $logoutGoTo = "index.php";
    > if ($logoutGoTo) {
    > header("Location: $logoutGoTo");
    > exit;
    > }
    > }
    > ?>
    > <?php
    > session_start();
    > $MM_authorizedUsers = "";
    > $MM_donotCheckaccess = "true";
    >
    > // *** Restrict Access To Page: Grant or deny access to
    this page
    > function isAuthorized($strUsers, $strGroups, $UserName,
    $UserGroup) {
    > // For security, start by assuming the visitor is NOT
    authorized.
    > $isValid = False;
    >
    > // When a visitor has logged into this site, the Session
    variable
    > MM_Username set equal to their username.
    > // Therefore, we know that a user is NOT logged in if
    that Session
    > variable
    > is blank.
    > if (!empty($UserName)) {
    > // Besides being logged in, you may restrict access to
    only certain
    > users
    > based on an ID established when they login.
    > // Parse the strings into arrays.
    > $arrUsers = Explode(",", $strUsers);
    > $arrGroups = Explode(",", $strGroups);
    > if (in_array($UserName, $arrUsers)) {
    > $isValid = true;
    > }
    > // Or, you may restrict access to only certain users
    based on their
    > username.
    > if (in_array($UserGroup, $arrGroups)) {
    > $isValid = true;
    > }
    > if (($strUsers == "") && true) {
    > $isValid = true;
    > }
    > }
    > return $isValid;
    > }
    >
    > $MM_restrictGoTo = "index.php";
    > if (!((isset($_SESSION['MM_Username'])) &&
    > (isAuthorized("",$MM_authorizedUsers,
    $_SESSION['MM_Username'],
    > $_SESSION['MM_UserGroup'])))) {
    > $MM_qsChar = "?";
    > $MM_referrer = $_SERVER['PHP_SELF'];
    > if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
    > if (isset($QUERY_STRING) &&
    strlen($QUERY_STRING) > 0)
    > $MM_referrer .= "?" . $QUERY_STRING;
    > $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar .
    "accesscheck=" .
    > urlencode($MM_referrer);
    > header("Location: ". $MM_restrictGoTo);
    > exit;
    > }
    > ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
    4.01//EN"
    > "
    http://www.w3.org/TR/html4/strict.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > <title>Registrasi</title>
    > <link href="css/stylesnew.css" type="text/css"
    media="screen"
    > rel="stylesheet">
    > <!--[if gte IE 5]>
    > <style>
    > #LeftMNav ul a {height: 1em;}
    > #LeftMNav li {float: left; clear: both; width: 100%;}
    > </style>
    > <![endif]-->
    > <style type="text/
    > ........
    >
    > how i can get username that user entered(login page) in
    new page ?
    > pls help me i'm just new bie....
    > tks 4 kind attentions,
    >
    > regds
    >
    >
    >
    >
    >
    >

  • About Log Buffer writhing..

    Hi,
    Wondering how Log Buffer behaves...
    1. If timesten is configured as single node(no replication and cache option), When does log buffer data write to log file?
    By running some test, it seems like only at checkpoint action it is being write.
    Is there any other way to write log buffer data beside with checkpoint action?
    2. Which process is doing writing action from log buffer to log file?
    Is it the same process that uses with replication and cache option?
    3. In TimesTen Manual ...
    asynchronous replication "TimesTen Data Manager writes the transaction update records to the transaction log buffer."
    Return Twosafe "The master replication agent writes the transaction records to the log and inserts a special precommit log record before the commit record."
    Then ... does it mean that log buffer write process is different according to replication type?
    4. I am assuming Log_Buffer_Wait from 'monitor;' output is the waiting time of Log Buffer writing time to logfile...
    If it is correct, is the possibility of Log_Buffer_Wait occurance increases when log buffer size is large with no replication option?
    w
    I am willing to hear for above.
    Thank you,

    TimesTen generates log records for the purposes of redo and undo. Log records are generated for pretty much any change to persistent recoverable data within TimesTen. Log records are first written into the in memory log buffer and then are written to disk by a dedicated flusher thread that runs within the sub-daemon process that is assigned to the datastore. The log flusher thread runs continuously when there is data to be flushed and when there is any significant write workload on the system log data will reach disk very shortly after it has been placed in the buffer. Under very light write workload it may talke a little longer for the data to reach disk.
    There is a single logical log buffer (size determined by LogBufMB) which in TimesTen 11g, is divided into multiple physical buffers (strands) for increased concurrency of logging operations ( number of strands determined by LogBufParallelism).
    Several of your observations are not correct; I would like to understand hwat tests you performed to arrive at these conclusions:
    1. Yes, the log buffer is flushed during a checkpoint operation but in fact it is also being flushed continuously at all times by the log flusher thread.
    2. You can force the buffer to be flushed at any time simply by executing a durable commit within the datastore. A durable commit flushes all log starnds synchronously to disk and does not return until the writes have completed successfully and been acknowledged by the storage hardware.
    3. The text that you quote from the replication guide is ambiguous and could be better phrased. When it talks about 'writing to the log' it means placing records in the in-memory log buffer. The presence or absence of replication does not fundamentally change the way logging works though the replication agent, when active, typically perfoms a durable commit every 100 ms. Also, in some replication modes, additional durable commits may be executed by the replication agent before sending a block of replicated transactions.
    4. The LOG_BUFFER_WAITS field in SYS.MONITOR counts the number of times that application transactions have been blocked due to there being no free space in the log buffer to receive their log records. This is due to some form of logging bottleneck. By far the most common reason is that the log buffer is undersized. the default size if only 64 MB and this is far too small for any kind of write intensive workload. For write intensive workloads a significantly larger log buffer size is needed (max size allowed is 1 GB).
    5. The field LOG_FS_WRITES in SYS.MONITOR counts the number of physical writes that the log flusher thread has performed to the logs on disk. The flusher will typically write a lot of data in a single write (when under heavy load). Flusher writes are filesystem block aligned.
    Hope that helps clarify things.
    Chris

  • Just got some weird voicemail about logging into my account to claim my $400???

    Call from (not kidding) 800-000-0000 first part was cut off, telling me to log into my account to receive my $400. And that at Verizon, we care about you????? Support has no idea what this is about, already chatted with them.

    I put the number into my search engine and this is one response.
    http://800notes.com/Phone.aspx/1-800-888-9599/2

  • About Log in Web Dynpro Java

    1. Following is my log-configuration:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log-configuration SYSTEM "log-configuration.dtd">
    <log-configuration>
         <log-formatters>
              <log-formatter
                   name="MyFormatter"
                   pattern="%24d %-40l [%t] %s: %m"
                   type="TraceFormatter"/>
         </log-formatters>
         <log-destinations>
              <log-destination
                   count="10"
                   effective-severity="INFO"
                   limit="100000"
                   name="MyDestination"
                   pattern="%t/trace.log"
                   type="FileLog"/>
         </log-destinations>
         <log-controllers>
              <log-controller
                   name="MyController"/>
         </log-controllers>
    </log-configuration>
    2. Following is my code:
      private static final com.sap.tc.logging.Location logger =
        com.sap.tc.logging.Location.getLocation(StartView.class);
      public void wdDoInit()
        //@@begin wdDoInit()
         logger.entering("StartView - wdDoInit()");
         logger.exiting("StartView - wdDoInit()");
        //@@end
    Question:
    Why I can not find the outfile in path ("c:\temp")?

    were you able to resolve this issue ?? Im facing similar problem, any help from you is highly appreciated.
    Thanks,

  • Question about logging

    Hi guys! How the log() method from ExternalContext works and how can i use log4j to log messages in my application??

    hi;
    Please take a look to log4j usage in the folloing link.
    http://logging.apache.org/log4j/docs/manual.html
    I use log4j for a long time, I suggest that initialize log4j using a servlet
    http://asahin.net

  • Confused about Log-In

    My iMac is ecrypted with FileVault, along with two encrypted external drives. One is used for Time Machine, the other is a bootable drive backed up with SuperDuper. I am running OS X 10.9.2.
    Ever since I encrypted this system I have to log-in twice every time I start or restart the computer.
    Recently, I encrypted my MacBook Pro. It also has two encrypted external drives, configured the same way as my iMac system.
    When I start or restart this system, I only have to log-in once.
    Before I encrypted the MacBook, I assumed that logging-in twice was normal for an encrypted system, but now I'm not so sure.

    So, I am left with 2 questions:
    1. Which situation is normal?
    2. How do I fix the one which is not?

  • A question about log.

    Hi all:
    In a program, i mixed up two kind of log mechinism:
    the Logger.global.info() and System.out.println().
    but what suprise me is that the sequence of the output is not the same for every run of the program.
    some time the message from Logger in front of the System.out, and sometime not.
    I wonder if the Logger run in a seperate thread different from the System.out? How to solve this problem?

    It is running in a separate thread. I would advise converting to all logging if possible. If not, declare a single variable and synch on it.
    public class MyClass {
        // other code
        private Object synchOutput = new Integer(33): // value and object type is irrelevant. ..
       public void someMethod ()
           synchronized (synchOutput) {
                // logging code.
       public void anotherMethod ()
           synchronized (synchOutput) {
                // Sysout code.
    }

  • Operation question about log

    if i set rampolicy to inuse mode,ckpt frequency to 0,log purge to true.whether the log will be auto purged when all connection disconnect from the datastore?
    Message was edited by:
    knights

    ChrisJenkins wrote:
    No logging mode (Logging=0) is a 'special use' option and has many, many limitations. For example:
    1. Replication is not available
    2. XLA and XLA/JMS is not available
    3. All locking is at the database level; even queries will acquire an exclusive database leve llock so the database essentially becomes single threaded
    4. Transactions are not available so there is no commit or rollback and any errors can leave multi row updates/deletes partially done
    5. The only persistence is now via checkpoints; but fuzzy checkpoint is not available so all checkpoints are blocking and will impede application access to the database
    {color:#3366ff}Essentially, no logging mode is only intended for bulk data load operatiosn when initially populating your datastore. {color}Hi Chris, I'm facing this case.
    During the time of loading cache group from db into data store,I wanted to close log operation when loading then open it after the operation. While I found that, after closing the log( by setting logging=0), I can't run the "load cache" command, which hints me error.
    Would you kindly pls. tell the way to disable the log temporarily? Many thanks!
    Regards,
    Michael
    It is not in general usable for any kind of operational running. TimesTen does not support purely in-memory operation. Checkpointing and logging are fundamental mechanims and are required for any real use of TimesTen.
    Chris

  • Something Fishy about log ins here on the forums

    I can login and navigate to the Android Forums
    if I click on Sign out I get a sign in icon
    If I click on sign in, it takes me to a different Login screen
    The login fails using my original login name and the UID that comes up for the forums.
    I think the initial Login takes me into My Verizon where I can pay my bill or navigate to the forums
    The failing login appears to take me into community.vzw.com
    Are there two different login UIDs and PWs from which I can get into the Forums?

    SuzyQ wrote:
    No, my login for MyVerizon is a different username and password and has no connection with the forums. If I log in to MyVerizon and then go to the forums, I am prompted to log in or create an account. I keep the two separate.
    Mine is the opposite.
    If I browse to VZW.com I see a login prompt where my UID is remembered and I can Log in and then navigate via a dropdown to the Forums where I am recognized with a different Screen Name which allows me to post in the Forums.
    If I browse to Community.vzw.com I see a Login prompt that does not remember my UID and does not allow me to log in uiding ither my UID or my screen name.  If I try to discover the UID for Log in, it asks for my email address and last name and then dumps me out saying that it has no record of that email address.
    This presents two problems:
    1.  If I am inactive and the Forum times out on me, it dumps me out to the Community.vzw.com sign in page where I am not recognized which forces me to navigate to My Verizon, Sign Out which brings me back to the Prompt that remembers my UID.
    2.  My Android Mobile devides can log in at VZW.com but can not navigate to the forums with the login intact.  The Dropdown Menu does not appear on the Mobile devices so I have to scroll down to a Link to the Forums that takes me in as a guest.

  • About log-in items

    Using either AppleScript or Terminal, I know how to get a list of the log-in items on the boot drive.
    Is there a way to get the corresponding lists for other drives on the same computer (without booting up on them)?

    Use a command such as:
    defaults read /Volumes/Macintosh HD/Users/username/Library/Preferences/com.apple.loginitems
    (61689)

Maybe you are looking for