Java Logging Issue.

The Below piece of code working fine and its writting the log in to LogOutput file.
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
private static Log logger = LogFactory.getLog(RequestAction.class);
logger.info("[perform] - Enter ");
=========================================
But i have written below helper class to globalize the Logging output and used same logic but its not printing any log statements
LoggerHelper.log(PropertiesLoader.class,TACLogger.ERROR," - ErrorMsg : " +io.getMessage(),io);
LoggerHelper.java
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class LoggerHelper
public static void log(Class caller, int severity ,String message, Throwable exception) {
Log loggerx = LogFactory.getLog(caller);
switch (severity) {
case DEBUG:
     loggerx.debug("[log] - " + message, exception);
break;
case INFO:
     loggerx.debug("[log] - " + message, exception);
break;
case ERROR:
     loggerx.debug("[log] - " + message, exception);
break;
case FATAL:
     loggerx.fatal(message, exception);
break;
Log4j.properties
# Set root logger level to INFO
log4j.rootLogger=INFO, logfile
# stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [Thread: %t] %p [%c] - %m%n
# logfile
log4j.appender.logfile=org.apache.log4j.RollingFileAppender
log4j.appender.logfile.File=D:/bea/weblogic81/Logs/nextgen/nextgen.log
log4j.appender.logfile.MaxFileSize=10240KB
log4j.appender.logfile.MaxBackupIndex=10000
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
log4j.appender.logfile.layout.ConversionPattern=%d [Thread: %t] %p [%c] - %m%n
the Logics are same but the Log Statements not writing into the files.
Thanks in advance.

Hi All,
Anyone has an idea about this..i have look around all the places but there is no soultion got yet..
its very great for me if anyone has some suggestions.
Thanks in advance.
Karthik.

Similar Messages

  • Problem with java logging API

    Hi there
    It`s the first time I`m using (I have to use) the standard java logging API.
    My need is to integrate it in an existing web-application based on struts.
    So my first step was to include the following code into an Struts Action-class:
    FileHandler file = new FileHandler("/pathToLogFile/myLogFile.log",true);
    file.setFormatter(new SimpleFormatter());
    logger.info("create info");
    By intention is to have exactly one log-file for the whole application, but indeed I'm getting multiple log-files, even for each request of one and the same Action/Servlet class, like
    myLogFile.log
    myLogFile.log.1
    myLogFile.log.2
    myLogFile.log.3
    Why does using append=true not work in the constructor of "FileHandler"
    Do I have to close the FileHandler each time I've used it?
    Is this a known issue?
    Thanks for any responds!

    @ Stone.li
    First, thanks for your answer.
    perhaps my question was quite confusing .... but my need is just
    to establish the logging API in an existing Web-Application and to have exactly one log-file for the whole application. This means I would have to provide in each servlet a FileHandler referencing to the log-file. I thought it would be part of the job of the logging API to synchronise this file access.

  • What is the current schedule for 6.1.2 and will it fix the Exchange transaction log issue in 6.1?

    Just spent the entire night with virtually no sleep with our firm's group of IT engineers trying to keep our Exchange system online due to massive transaction log growth. Confirmed the issue related to 6.1 calendar bug with Activesync. The workarounds are not practical for large groups of users who depend on their mobile devices for work. Our users have no way of knowing that they are causing an issue so the Apple guidance isnt terribly useful to communicate to 1000 users. When can we expect a resolution? The problem is only going to get worse as more and more users hit the bug. Does anyone know if the issue will resolve as soon as someone installs the 6.1.2 update, assuming that has the fix. Im not trying to bash anyone but this is a very serious problem in enterprise deployments.

    The update was released some time today. 6.1.2 appears to specifically fix the Exchange issue causing excess comms and logging issues. However, although the update is available i do not see the notification badge on the Settings icon. Is this controlled by Apple or is there a user setting i am missing somewhere? I would prefer that all users see the badge to expedite user action.

  • Config certificate and log issues

    I config certificate and use it to connect ipsec vpn , I just config    
    jinan-neusoft(config)#ip domain-name neusoft.com
    jinan-neusoft(config)#crypto key generate rsa general-keys
    The name for the keys will be: jinan-neusoft.neusoft.com
    Choose the size of the key modulus in the range of 360 to 4096 for your
      General Purpose Keys. Choosing a key modulus greater than 512 may take
      a few minutes.
    How many bits in the modulus [512]:
    % Generating 512 bit RSA keys, keys will be non-exportable...
    [OK] (elapsed time was 0 seconds)
    jinan-neusoft(config)#
    Nov 16 01:05:44.435:  RSA key size needs to be atleast 768 bits for ssh version 2
    jinan-neusoft(config)#
    Nov 16 01:05:44.435: %SSH-5-ENABLED: SSH 1.5 has been enabled
    jinan-neusoft(config)#crypto pki trustpoint CA1
    jinan-neusoft(ca-trustpoint)# enrollment url http://59.44.43.217:80
    jinan-neusoft(ca-trustpoint)# revocation-check crl
    jinan-neusoft(ca-trustpoint)# rsakeypair DMVPN-SY-KEY
    jinan-neusoft(ca-trustpoint)# auto-enrol
    jinan-neusoft(config)#crypto pki authenticate CA1
    Certificate has the following attributes:
           Fingerprint MD5: D5F9D56B 4D9A4260 43F21D39 811D7AD5
          Fingerprint SHA1: 1E49B228 DD57F4DB 43DD2C2F 03870C18 840DA12A
    % Do you accept this certificate? [yes/no]: y
    Trustpoint CA certificate accepted.
    then I have log issues like below ,even I config auto-enroll , I don t get  certificate pending information  from my certificate server ,
    my device is C3925 and ios is c3900-universalk9-mz.SPA.151-4.M4.bin ,how to deal with it ,top players , THX~~~~
    Nov 16 01:07:54.871: %PKI-6-CERTRENEWAUTO: Renewing the router certificate for trustpoint CA1
    Nov 16 01:07:54.951: %CRYPTO-6-AUTOGEN: Generated new 512 bit key pair
    Nov 16 01:07:55.115: CRYPTO_PKI:  Certificate Request Fingerprint MD5: 939AF8C1 854DDA90 8FE03058 5635468F
    Nov 16 01:07:55.115: CRYPTO_PKI:  Certificate Request Fingerprint SHA1: 50F869D2 C0814317 7EB2ECC9 90461F3A 353E7089
    Nov 16 01:07:55.119: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6
    jinan-neusoft(config)#D05F70z 6D06B50z 6D07268z 6D43018z 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    Nov 16 01:07:55.119: %SYS-2-MALLOCFAIL: Memory allocation of 40 bytes failed from 0x6D05DEC, alignment 0
    Pool: Processor  Free: 731143916  Cause: Interrupt level allocation
    Alternate Pool: None  Free: 0  Cause: Interrupt level allocation
    -Process= "<interrupt level>", ipl= 3
    -Traceback= 5564384z 6892328z 68B3064z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D43018z 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z
    Nov 16 01:07:55.119: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    jinan-neusoft(config)#
    Nov 16 01:08:09.719: %PKI-6-CERTRENEWAUTO: Renewing the router certificate for trustpoint CA1
    Nov 16 01:08:09.879: CRYPTO_PKI:  Certificate Request Fingerprint MD5: 939AF8C1 854DDA90 8FE03058 5635468F
    Nov 16 01:08:09.879: CRYPTO_PKI:  Certificate Request Fingerprint SHA1: 50F869D2 C0814317 7EB2ECC9 90461F3A 353E7089
    jinan-neusoft(config)#
    Nov 16 01:08:09.883: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D43018z 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    Nov 16 01:08:09.883: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    jinan-neusoft(config)# Nov 16 01:07:54.871: %PKI-6-CERTRENEWAUTO: Renewing the router certificate for trustpoint CA1
    Nov 16 01:07:54.951: %CRYPTO-6-AUTOGEN: Generated new 512 bit key pair
    Nov 16 01:07:55.115: CRYPTO_PKI:  Certificate Request Fingerprint MD5: 939AF8C1 854DDA90 8FE03058 5635468F
    Nov 16 01:07:55.115: CRYPTO_PKI:  Certificate Request Fingerprint SHA1: 50F869D2 C0814317 7EB2ECC9 90461F3A 353E7089
    Nov 16 01:07:55.119: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6
    jinan-neusoft(config)#D05F70z 6D06B50z 6D07268z 6D43018z 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    Nov 16 01:07:55.119: %SYS-2-MALLOCFAIL: Memory allocation of 40 bytes failed from 0x6D05DEC, alignment 0
    Pool: Processor  Free: 731143916  Cause: Interrupt level allocation
    Alternate Pool: None  Free: 0  Cause: Interrupt level allocation
    -Process= "<interrupt level>", ipl= 3
    -Traceback= 5564384z 6892328z 68B3064z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D43018z 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z
    Nov 16 01:07:55.119: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    jinan-neusoft(config)#
    Nov 16 01:08:09.719: %PKI-6-CERTRENEWAUTO: Renewing the router certificate for trustpoint CA1
    Nov 16 01:08:09.879: CRYPTO_PKI:  Certificate Request Fingerprint MD5: 939AF8C1 854DDA90 8FE03058 5635468F
    Nov 16 01:08:09.879: CRYPTO_PKI:  Certificate Request Fingerprint SHA1: 50F869D2 C0814317 7EB2ECC9 90461F3A 353E7089
    jinan-neusoft(config)#
    Nov 16 01:08:09.883: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D43018z 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    Nov 16 01:08:09.883: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 4127784z
    jinan-neusoft(config)#

    I do not have the answer but have exactly the same issue, looks as if it is a bug of some kind :
    Cisco CISCO3945-CHASSIS (revision 1.0) with C3900-SPE150/K9 with 980992K/67584K bytes of memory.
    Processor board ID FCZ163371P3
    6 FastEthernet interfaces
    3 Gigabit Ethernet interfaces
    1 terminal line
    1 Virtual Private Network (VPN) Module
    DRAM configuration is 72 bits wide with parity enabled.
    255K bytes of non-volatile configuration memory.
    250880K bytes of ATA System CompactFlash 0 (Read/Write)
    System image file is "flash0:c3900-universalk9-mz.SPA.151-4.M4.bin"
    Nov 16 07:37:16.611: CRYPTO_PKI: Signature Certificate Request Fingerprint MD5: 358FF778 7C2E66AE 895BF088 BF022442
    .Nov 16 07:37:16.615: CRYPTO_PKI: Signature Certificate Request Fingerprint SHA1: 5F7A4300 20B62132 83D08C6E 2D315DF4 51EFE94D
    .Nov 16 07:37:16.623: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 412
    7784z
    .Nov 16 07:37:16.623: %SYS-2-MALLOCFAIL: Memory allocation of 72 bytes failed from 0x6D05DEC, alignment 0
    Pool: Processor  Free: 704933204  Cause: Interrupt level allocation
    Alternate Pool: None  Free: 0  Cause: Interrupt level allocation
    -Process= "", ipl= 3
    -Traceback= 5564384z 6892328z 68B3064z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4AC
    B9F4z Nov 16 07:37:16.611: CRYPTO_PKI: Signature Certificate Request Fingerprint MD5: 358FF778 7C2E66AE 895BF088 BF022442
    .Nov 16 07:37:16.615: CRYPTO_PKI: Signature Certificate Request Fingerprint SHA1: 5F7A4300 20B62132 83D08C6E 2D315DF4 51EFE94D
    .Nov 16 07:37:16.623: %SYS-3-INVMEMINT: Invalid memory action (malloc) at interrupt level
    -Traceback= 5564384z 68B3034z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4ACB9F4z 412
    7784z
    .Nov 16 07:37:16.623: %SYS-2-MALLOCFAIL: Memory allocation of 72 bytes failed from 0x6D05DEC, alignment 0
    Pool: Processor  Free: 704933204  Cause: Interrupt level allocation
    Alternate Pool: None  Free: 0  Cause: Interrupt level allocation
    -Process= "", ipl= 3
    -Traceback= 5564384z 6892328z 68B3064z 945A8D0z 6D05DF0z 6D05F70z 6D06B50z 6D07268z 6D4308Cz 6D25044z 6D1988Cz 6D4CCE0z 91F0154z 91F0CC4z 91F0DA4z 4AC
    B9F4z

  • How to output java logging only to a log file except stderr?

    I create a file logging and noticed that java logging output a log file and stderr simultanously. How to output the logging message only to the log file?
    Thanks.

    HarishDv wrote:
    I dont have indesign  installed on my system. I only have the binary , which needs modification and i have to save back to the DB as indd.
    Can't be done, for a realistic assessment of "can". InDesigns documents cannot reliably be created or modified without InDesign itself. (*)
    If you need to do this on native InDesign documents, you have to buy and install it.
    * "Not true, there is always IDML". But that's not a 'binary'; and you cannot (**) "convert" a binary INDD to IDML and back again without InDesign.
    ** Again, for a remotely realistic value of "can".

  • Java Logging in OC4J

    I use the Java Logging API in several web applications. Now I need to deploy these applications to OC4J.
    In the standalone version of OC4J 10.1.3 I can the log messages in the console. But I would like to see the log messages in the Enterprise Manager.
    In the Enterprise Manager there is an application.log file for each web application. How can I direct my java logging messages to these files? Or something similar so that I can browse/search the log messages in the Enterprise Manager ?
    I have tried to read everything I can find on the OTN web site. The developers guide has something on logging, but I can not get it to work.
    Can anyone please provide me with some glues/guidelines/short example on how I can get this to work?

    Onw way of writting to these files is to use the log methods in GenericServlet (inherited by HttpServlet):
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/GenericServlet.html#log(java.lang.String)
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/GenericServlet.html#log(java.lang.String, java.lang.Throwable)
    or these log methods in ServletContext:
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#log(java.lang.String)
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#log(java.lang.String, java.lang.Throwable)
    I have done this succesfully.
    Chris

  • 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"

  • HT1338 There is a lot of talk about the Java security issues and the ability to download a patch fix, do i need to do this or will software update pick this up for me?

    There is a lot of talk about the Java security issues and the ability to download an apple patch fix, do i need to do this or will software update pick this up for me?

    Thanks for that, how do I establish if I have Java installed as on Safari preferences it indicates the following
    Web content - Enable Java
                        - Enable JavaScript

  • Practical use of Java Logging API

    There was a recent technical tip about the Java Logging API, but after reading it I still don't understand how to use it in a real situation.
    Can anyone help me with this with a practical example?
    At the moment I have try-catch clauses that catch exceptions and print a message in a System.err log that I can consult if there's a specific problem.
    How should I be using the Logging API? I feel sure that it can help me, but can't see how.
    Thanks for any practical information.

    What if you don't want to write to system.err anymore? What if you need to write something to the windows event log? What if system.err is irrelevant (nt service), ...
    Btw, lots of examples on the JDK1.4 logging api:
    http://www.esus.com/docs/GetIndexPage.jsp?uid=265

  • Use Java Logging mechanism

    We have a requirement to log application errors in a local log file in the form of key/value pairs (from a property object) after every transaction, append to the previous transaction and generate one log file for each day.
    Log file example,
    currentTime=xxxx
    message=xxxxx
    userId=xxxx
    etc.
    What would be the best way to do it ? Can I take advantage of the Java Logging API, like file handler , although it does not do exactly what I wanted ?

    Thanks for the reply. But the company standard does
    not allow open source package like log4j.Then the company standard is completely nuts... but they're like that aren't they... I'd still get a copy of the log4j source from the apache site, to use a working example of how to do it well... then maybe write a simplified "write behind" logging service based on it... a single format "log4j-lite"
    Have fun with it.
    Keith.

  • Reverse call log issue

    i keep getting an error when i try to do a reverse call lookup. it says try setting phone list view to "call log" but i don't have that option. It says if this option is unavailable this is a known but and we are working with RIM to correct the issue. If you require assitance accessing the phone list view settings or would like to be notified when a fix is available please use the Send Us Feedback option and indicate Reverse Call Log issue in message. But where is this send us feedback? I'm so confused. Anyone have this problem or know where I can get some help for it? Thanks again

    How did you reload the firmware? Did you backup the data and perform a reset using *#7370# before reloading? Try and reply.
    Nokia C7

  • Java logging API (1.4) -- where's the file?

    Where on God's green earth does the log file get written to?
    I am doing some very simple code:
    import java.util.logging.*;
    public class SimpleLogging {
       static Logger jcfeLog = Logger.getLogger("test1");
       static Logger sampleLog = Logger.getLogger("test2");
       public static void main(String [] args)
          jcfeLog.warning("sample warning");
          sampleLog.log(Level.INFO, "sample info entry");
          byte[] moreInfo = new byte[10];
          //fill moreInfo with some binary info
          jcfeLog.log(Level.FINEST, "Some obscure event", new Object[]{moreInfo});
    } doesn't get much simpler, plus I am using the default properties file. I get the console output but simply cannot find the log file anywhere on my system. Just for kicks, here is the config entry for the file:
    java.util.logging.FileHandler.pattern =%t/java%u.logmy understanding is that it should go to the temp directory?
    also, why aren't the specs for the config file listed anywhere, all these %t, %u, etc.....????

    The FileHandler API gives the meaning for the % symbols.
    http://java.sun.com/j2se/1.4/docs/api/java/util/logging/FileHandler.html
    Your pattern indicates that the file should be put in the system's temp directory, with the file name java###.log.
    Maybe you should try calling the addHandler method on your Loggers, and add a FileHandler to write the messages to that file.

  • AS Java logs

    Hi All,
    I have few question on AS Java logs.
    - how many type of log files can be generated and what are they? (e.g - security audit log, security log, system log, etc)
    - whether logs are activated by default? how to activate the log?
    - how to extract logs? whether I can use ABAP itself or any other way to extract?
    Thank you.
    With Regards,
    Gandhi Subramani

    1) I have format for security audit log. Can you give the file format of security log file?
    I checked here on a system, and there is no format defined. (if this is what you mean...)
    2) Whether data in log file depends on OS where AS java server is installed?
    (example : event date will be seconds since 1970-01-01 00:00:00 UTC in linux)
    No, as far as I know (just checked a Windows system) the time stamp in the logfile is written in epoch format. (like you already mentioned)
    Check http://www.epochconverter.com on how to convert epoch to a readable format.
    3) Any API's available for fetching the logs?
    That is very likely, but I don't know them... You could write a script yourself to analyze this log.
    Kind regards,
    Mark

  • Java Logging - Socket Handler

    How to use Socket Handler of java.util.logging package. Do we need to write a SocketServer to receive the LogRecord from SocketHandler or java itself provides SocketServer implementation to log the records?

    I am not seeing any socket server implementation just like log4j in java logging (JDK1.4.2) API documentation. I just want to know is there any additional packages available for this.

  • Java logging questions - an example would really help

    We have taken over a project (i.e. we inherited someone else's code). I am relatively new to java. We would like to add debug messages or log messages to trace the application. Is there an easy way to insert debug messages and view the applicable log files?
    1.) I added the following code to add a debug message "log.error("Inside doResetPassword (" + userIdentification + ", " + newPassword + ")");"
    2.) Where is this log file located (what is the name of the log file)? Do I have to enable logging in Oracle? What are the steps to enable the logging? Is there a console that displays the log messages?
    Any help would be greatly appreciated ...
    Thanks,
    Mike
    public class AuthenticationListener implements Listener {
    private static final Log log = LogFactory.getLog(AuthenticationListener.class);
    PersonnelService personnelService;
    EmailService emailService;
    * Setter for Spring injection of {@link EmailService}.
    * @param emailService
    public void setEmailService(EmailService emailService) {
    this.emailService = emailService;
    * Setter for Spring injection of {@link PersonnelService}.
    * @param personnelService
    public void setPersonnelService(PersonnelService personnelService) {
    this.personnelService = personnelService;
    public void doResetPassword(String userIdentification, String newPassword) {
    Personnel personnel = personnelService.loadPersonnelById(Integer.parseInt(userIdentification));
    log.error("Inside doResetPassword (" + userIdentification + ", " + newPassword + ")");
    try {
    emailService.send(new PasswordEmail(personnel, newPassword));
    } catch (Exception e) {
    log.error("AuthenticationListener.doResetPassword: " + e.getMessage());
    }

    Hi,
    You should check out log4j. It's pretty easy to use, and has been the favorite logging tool for pretty much everyone I've worked with for the last few years. It's free, just google it.
    You won't have to change your java code, it plugs into the standard Java logging facility automatically.
    You just put log4j.jar and log4j.xml into your applib directory. Here is an example of a log4j.xml file that logs both to the console and to the file /logs/my.log. It assumes your code is in 'com.mypackage.' You can have as many logger elements as you want, and have different packages or classes set to different logging levels.
    <pre>
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
         <appender name="console" class="org.apache.log4j.ConsoleAppender">
              <param name="Target" value="System.out" />
              <layout class="org.apache.log4j.PatternLayout">
                   <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p %C %m%n" />
              </layout>
         </appender>
         <appender name="file" class="org.apache.log4j.RollingFileAppender">
              <param name="File" value="/logs/my.log" />
         <param name="Append" value="true" />     
              <layout class="org.apache.log4j.PatternLayout">
                   <param name="ConversionPattern"
                        value="%d{HH:mm:ss,SSS} %-5p %c %m%n" />
              </layout>
         </appender>
         <logger name="com.mypackage">
              <level value="debug" />
         </logger>
         <root>
              <priority value="warn" />
              <appender-ref ref="console" />
              <appender-ref ref="file" />
         </root>
    </log4j:configuration>
    </pre>
    Hope that helps,
    Mike from Ottawa

Maybe you are looking for

  • MacBook Pro 15 with Windows 8.1 installed via Boot Camp problem with keys "@" and " " of the keyboard

    Hello, I have a MacBook Pro Retina Maverick in 2013 on which I installed Windows via Boot Camp 8.1. The installation went well but when I am running Windows 8.1, I have a problem with "@" and "<" keys on the keyboard. When I type the "@" key, I get "

  • DataSource-Transport in R/3 does not work

    Hello everybody, we're currently having some trouble with transporting DataSources in the SAP R/3 out of the transactions RSA6 (for standard DataSources) or RSO2 (for generic DataSources). system environment: We're using three R/3-Systems (deployment

  • IPOD NOT GIVING AN ANSWER

    Hello to everyone ! My friend has bought a 5G iPod since a weeks ago on-line. Some days ago, the iPod suddently stopped playing and it turned off automatically. Now, when i'm trying to start it it doesn't gives any answer, even when i'm connecting it

  • Regarding Value Mapping

    Hi, Iam doing a scenario which deals with value mapping,and there are duplicate values in destination for different sources.I have created a Group for all repeating values in destination,and i have used that name to map for different sources.But my s

  • In_house_roaming (iPhone 4)

    Hi to all... I recently found an "In_House_Roaming" option on my iPhone 4 Settings -> General -> Profile -> In_House_Roaming Its under a "Provisioning" label and it's status is "verified" and there's a "Remove" option Any clues???