How is java.util.logging used to log to unix syslog?

I'm trying to log out to syslog using the java.util.logging that is now in 1.4. I've read all I can find on this topic (not much) and have solicited the used of some syslog free ware (protomatter) but still can't get this to work. I feel like I'm missing something simple here, any help would be appreciated....
Here is my latest attempt:
import java.util.logging.*;
import java.util.*;
import java.io.*;
import com.protomatter.syslog.SyslogHandler;
public class SyslogTest
public static void main(String argv[]){
Logger logger2 = Logger.getLogger("local3");
SyslogHandler ch = new SyslogHandler();
ch.setLevel(Level.WARNING);
logger2.addHandler(ch);
logger2.warning("this is a log message");
if (logger2.isLoggable(Level.WARNING)) {
System.out.println("Is LOGGABLE");
else {
System.out.println("Is not loggable");
When this is run nothing is printed to any of the local3 facilities. I've verified that syslog is running fine from the command line using unix logger, so the problem seems to be isolated to my java.
Thanks.

Hi,
What is in your logging.properties file? Can you also include the contents of this file?
Cheers,
Craig.

Similar Messages

  • USage of import java.util.* & using another package

    When we use import java.util.*; from where does JAVA take the class that are related to util, when I did search for "util" in my machine, I got about 50 results for folders named util and also some where in a folder called "java" when I opened it it did not have the classes, that I was expecting. So I am not clear where does it get the class files from. This is not only for this but for any import commands like import java.io.*;
    When we get another package or source code which was written in java and want to use it in our code where do we have keep the files ? eg. i have the java code that i m writing in c:\java then do I put all the downloaded related files in that folder and then run the code ? or i keep a folder inside java folder and then import them into my code ?
    please do advice.
    Thanks in advance.

    When we use import java.util.*; from where does JAVA
    take the class that are related to util,It means when you use a classname in your code, and that classname is neither in the same package as the class you're writing, nor imported specifically by classname, that it will search for it.
    Where it searches is every folder called util whose parent folder is called java which in turn is at the root level of one of the classpath elements. That is, if classpath contains "A" and "B", and you refer to a class called "Foo", then it will look for "A/java/util/Foo.class" and "B/java/util/Foo.class".
    search for "util" in my machine, I got about 50
    results for folders named util and also some where in
    a folder called "java" when I opened it it did not
    have the classes, that I was expecting. So I am not
    clear where does it get the class files from. This is
    not only for this but for any import commands like
    import java.io.*; All the java.* and javax.* and whatever else it part of the core API is in rt.jar, which lives inside the Java distribution. Classpath elements can be directories or jar files or zip files.

  • Logging using ADF Logging - how to ?

    Dear all,
    I have several web-applications developed with JDeveloper and deployed on a WLS.
    Each application routes its System.out.println(whatever) command on the same weblogic.log file.
    I would like to have a log file for each application instead.
    So I've implemented the ADFLogging in my application, and I use this commands:
    import oracle.adf.share.logging.ADFLogger;
    private static ADFLogger _logger =
    ADFLogger.createADFLogger(loggingBean.class);
    _logger.warning("this is a warning msg");
    _logger.severe("this is a severe msg");
    Then I specify, in the WLS console, a file for logging for one application.
    Fact is, the logging from the logger goes always in the Adminserver.log and in the basedomain.log, but not in the log file I've specified for the application.
    How to get the _logger log messages in that specified file ?
    Am I missing something obvious here ?
    Thanks in advance,
    Sergio.

    Well, I guess that the relevant file is
    ./Middleware/user_projects/domains/base_domain/config/fmwconfig/servers/AdminServer/logging.xml
    Here is the content:
    <?xml version="2.0" encoding="UTF-8"?>
    <logging_configuration>
    <log_handlers>
    <log_handler name='console-handler' class='oracle.core.ojdl.logging.ConsoleHandler' formatter='oracle.core.ojdl.weblogic.ConsoleFormatter' level='WARNING:32'/>
    <log_handler name='odl-handler' class='oracle.core.ojdl.logging.ODLHandlerFactory' filter='oracle.dfw.incident.IncidentDetectionLogFilter'>
    <property name='path' value='${domain.home}/servers/${weblogic.Name}/logs/${weblogic.Name}-diagnostic.log'/>
    <property name='maxFileSize' value='10485760'/>
    <property name='maxLogSize' value='104857600'/>
    <property name='encoding' value='UTF-8'/>
    <property name='useThreadName' value='true'/>
    <property name='supplementalAttributes' value='J2EE_APP.name,J2EE_MODULE.name,WEBSERVICE.name,WEBSERVICE_PORT.name,composite_instance_id,component_instance_id,composite_name,component_name'/>
    </log_handler>
    <log_handler name='wls-domain' class='oracle.core.ojdl.weblogic.DomainLogHandler' level="WARNING"/>
    <log_handler name='owsm-message-handler' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
    <property name='path' value='${domain.home}/servers/${weblogic.Name}/logs/owsm/msglogging'/>
    <property name='maxFileSize' value='10485760'/>
    <property name='maxLogSize' value='104857600'/>
    <property name='encoding' value='UTF-8'/>
    <property name='supplementalAttributes' value='J2EE_APP.name,J2EE_MODULE.name,WEBSERVICE.name,WEBSERVICE_PORT.name'/>
    </log_handler>
    <log_handler name='em-log-handler' level='NOTIFICATION:32' class='oracle.core.ojdl.logging.ODLHandlerFactory' filter='oracle.dfw.incident.IncidentDetectionLogFilter'>
    <property name='path' value='${domain.home}/servers/${weblogic.Name}/sysman/log/emoms.log'/>
    <property name='format' value='ODL-Text'/>
    <property name='useThreadName' value='true'/>
    <property name='maxFileSize' value='5242880'/>
    <property name='maxLogSize' value='52428800'/>
    <property name='encoding' value='UTF-8'/>
    </log_handler>
    <log_handler name='em-trc-handler' level='TRACE:32' class='oracle.core.ojdl.logging.ODLHandlerFactory'>
    <property name='logreader:' value='off'/>
    <property name='path' value='${domain.home}/servers/${weblogic.Name}/sysman/log/emoms.trc'/>
    <property name='format' value='ODL-Text'/>
    <property name='useThreadName' value='true'/>
    <property name='locale' value='en'/>
    <property name='maxFileSize' value='5242880'/>
    <property name='maxLogSize' value='52428800'/>
    <property name='encoding' value='UTF-8'/>
    </log_handler>
    </log_handlers>
    <loggers>
    <logger name="" level="WARNING:1">
    <handler name="odl-handler"/>
    <handler name="wls-domain"/>
    <handler name="console-handler"/>
    </logger>
    <logger name="oracle" level="NOTIFICATION:1"/>
    <logger name="oracle.adf"/>
    <logger name="oracle.adf.desktopintegration"/>
    <logger name="oracle.adf.faces"/>
    <logger name="oracle.adf.controller"/>
    <logger name="oracle.adfinternal"/>
    <logger name="oracle.adfinternal.controller"/>
    <logger name="oracle.jbo"/>
    <logger name="oracle.adfdt"/>
    <logger name="oracle.adfdtinternal"/>
    <logger name="oracle.bam"/>
    <logger name="oracle.bam.adapter"/>
    <logger name="oracle.bam.common"/>
    <logger name="oracle.bam.system"/>
    <logger name="oracle.bam.middleware"/>
    <logger name="oracle.bam.adc.security"/>
    <logger name="oracle.bam.common.security"/>
    <logger name="oracle.bam.adc.ejb.BamAdcServerBean"/>
    <logger name="oracle.bam.reportcache.ejb.ReportCacheServerBean"/>
    <logger name="oracle.bam.eventengine.ejb.EventEngineServerBean"/>
    <logger name="oracle.bam.ems.ejb.EMSServerBean"/>
    <logger name="oracle.bam.adc.api"/>
    <logger name="oracle.bam.adc"/>
    <logger name="oracle.bam.eventengine"/>
    <logger name="oracle.bam.ems"/>
    <logger name="oracle.bam.webservices"/>
    <logger name="oracle.bam.web"/>
    <logger name="oracle.bam.reportcache"/>
    <logger name="oracle.bpm"/>
    <logger name="oracle.bpm.analytics"/>
    <logger name="oracle.integration"/>
    <logger name="oracle.integration.platform.blocks.cluster"/>
    <logger name="oracle.integration.platform.blocks.deploy.coordinator"/>
    <logger name="oracle.integration.platform.blocks.event.saq"/>
    <logger name="oracle.integration.platform.blocks.java"/>
    <logger name="oracle.integration.platform.faultpolicy"/>
    <logger name="oracle.integration.platform.testfwk"/>
    <logger name="oracle.soa"/>
    <logger name="oracle.soa.adapter"/>
    <logger name="oracle.soa.b2b"/>
    <logger name="oracle.soa.b2b.apptransport"/>
    <logger name="oracle.soa.b2b.engine"/>
    <logger name="oracle.soa.b2b.repository"/>
    <logger name="oracle.soa.b2b.transport"/>
    <logger name="oracle.soa.b2b.ui"/>
    <logger name="oracle.soa.bpel"/>
    <logger name="oracle.soa.bpel.console"/>
    <logger name="oracle.soa.bpel.engine"/>
    <logger name="oracle.soa.bpel.engine.activation"/>
    <logger name="oracle.soa.bpel.engine.agents"/>
    <logger name="oracle.soa.bpel.engine.bpel"/>
    <logger name="oracle.soa.bpel.engine.compiler"/>
    <logger name="oracle.soa.bpel.engine.data"/>
    <logger name="oracle.soa.bpel.engine.delivery"/>
    <logger name="oracle.soa.bpel.engine.deployment"/>
    <logger name="oracle.soa.bpel.engine.dispatch"/>
    <logger name="oracle.soa.bpel.engine.sensor"/>
    <logger name="oracle.soa.bpel.engine.translation"/>
    <logger name="oracle.soa.bpel.engine.ws"/>
    <logger name="oracle.soa.bpel.engine.xml"/>
    <logger name="oracle.soa.bpel.entity"/>
    <logger name="oracle.soa.bpel.jpa"/>
    <logger name="oracle.soa.bpel.system"/>
    <logger name="oracle.soa.dvm"/>
    <logger name="oracle.soa.management.facade.api"/>
    <logger name="oracle.soa.mediator"/>
    <logger name="oracle.soa.mediator.common"/>
    <logger name="oracle.soa.mediator.common.cache"/>
    <logger name="oracle.soa.mediator.common.error"/>
    <logger name="oracle.soa.mediator.common.error.recovery"/>
    <logger name="oracle.soa.mediator.common.message"/>
    <logger name="oracle.soa.mediator.dispatch"/>
    <logger name="oracle.soa.mediator.dispatch.resequencer.toplink"/>
    <logger name="oracle.soa.mediator.filter"/>
    <logger name="oracle.soa.mediator.instance"/>
    <logger name="oracle.soa.mediator.management"/>
    <logger name="oracle.soa.mediator.metadata"/>
    <logger name="oracle.soa.mediator.monitor"/>
    <logger name="oracle.soa.mediator.resequencer"/>
    <logger name="oracle.soa.mediator.resequencer.besteffort"/>
    <logger name="oracle.soa.mediator.resequencer.fifo"/>
    <logger name="oracle.soa.mediator.resequencer.standard"/>
    <logger name="oracle.soa.mediator.service"/>
    <logger name="oracle.soa.mediator.serviceEngine"/>
    <logger name="oracle.soa.mediator.transformation"/>
    <logger name="oracle.soa.mediator.utils"/>
    <logger name="oracle.soa.mediator.validation"/>
    <logger name="oracle.soa.scheduler"/>
    <logger name="oracle.soa.services.common"/>
    <logger name="oracle.soa.services.identity"/>
    <logger name="oracle.soa.services.notification"/>
    <logger name="oracle.soa.services.rules"/>
    <logger name="oracle.soa.services.rules.obrtrace"/>
    <logger name="oracle.soa.services.workflow"/>
    <logger name="oracle.soa.services.workflow.common"/>
    <logger name="oracle.soa.services.workflow.evidence"/>
    <logger name="oracle.soa.services.workflow.metadata"/>
    <logger name="oracle.soa.services.workflow.persistency"/>
    <logger name="oracle.soa.services.workflow.query"/>
    <logger name="oracle.soa.services.workflow.report"/>
    <logger name="oracle.soa.services.workflow.runtimeconfig"/>
    <logger name="oracle.soa.services.workflow.soa"/>
    <logger name="oracle.soa.services.workflow.task"/>
    <logger name="oracle.soa.services.workflow.task.dispatch"/>
    <logger name="oracle.soa.services.workflow.task.routing"/>
    <logger name="oracle.soa.services.workflow.user"/>
    <logger name="oracle.soa.services.workflow.verification"/>
    <logger name="oracle.soa.services.workflow.worklist"/>
    <logger name="oracle.soa.services.workflow.performance"/>
    <logger name="oracle.soa.services.cmds"/>
    <logger name="oracle.soa.wsif"/>
    <logger name="oracle.soa.xref"/>
    <logger name="oracle.ucs"/>
    <logger name="oracle.sdp"/>
    <logger name="oracle.sdpinternal"/>
    <logger name="oracle.sdp.messaging"/>
    <logger name="oracle.sdp.messaging.client"/>
    <logger name="oracle.sdp.messaging.driver"/>
    <logger name="oracle.sdp.messaging.engine"/>
    <logger name="oracle.sdp.messaging.parlayx"/>
    <logger name="oracle.sdp.messaging.server"/>
    <logger name="oracle.wsm"/>
    <logger name="oracle.wsm.msg.logging" level="NOTIFICATION:1" useParentHandlers="false">
    <handler name="owsm-message-handler"/>
    <handler name="wls-domain"/>
    </logger>
    <logger name='oracle.sysman' level='NOTIFICATION:32' useParentHandlers='false'>
    <handler name='em-log-handler'/>
    <handler name='em-trc-handler'/>
    </logger>
    </loggers>
    </logging_configuration>
    --------------------------

  • When using wusa.exe to install MSU update package and enabling logging using the /log switch, what format are the log files in?

    I have been installing a number of hotfixes for Windows 7 using MSU files and the wusa.exe utility included in Windows. I thought it would be a good idea to generate separate log files for each update as it was installed since wusa.exe now supports this
    option using /log:<file name>. However, the log files created do not seem to be regular text files or any other log file format that I immediately recognize. When opened in Notepad or Wordpad you can see that they contain a lot of additional binary data
    which can't be read by a regular text viewer.
    Does anyone know what format these log files are in? What tool should you use to read them?

    I have been installing a number of hotfixes for Windows 7 using MSU files and the wusa.exe utility included in Windows. I thought it would be a good idea to generate separate log files for each update as it was installed since wusa.exe now supports this
    option using /log:<file name>. However, the log files created do not seem to be regular text files or any other log file format that I immediately recognize. When opened in Notepad or Wordpad you can see that they contain a lot of additional binary data
    which can't be read by a regular text viewer.
    Does anyone know what format these log files are in? What tool should you use to read them?
    Only Microsoft can manage to design something as stupid as this. If you start wusa from the command line, it pops up the alternative command line switches. For log, it just says: " /log     - installer will enable logging". It doesn't say that you
    should specify the log file name, hence not HOW you specify it (" /log:<path\filename>.") It doesn't say what extension to use for the file, alas which file type it is (" /log:<path\filename.evtx>."). You open it in notepad, you cannot read it.
    You open it in sccm's cmtrace.exe/trace32.exe, you get nothing. IT IS NOT POSSIBLE TO IMPLEMENT THIS IN A WORSE WAY. How can something be so bad? How can Microsoft get such stupidity inhouse, when you need to go through six interviews or something to get in??
    I cannot believe it - unfortunely, this is seen again and again. 

  • Error when trying to use the Log Viewer

    Hello experts, today I wanted to examine some logs using the Log Viewer on Visual Administrator. However, when clicking on this service, the Visual Administrator would freeze for a long while and after that, an error message was displayed. I do not remember the exact message, but it was something like "A fatal error occurred. For more information, click on the Details button". After clicking on that button, the following error was displayed:
    com.sapmarkets.bam.util.BAMRuntimeException
    at com.sapmarkets.bam.jmx.connector.rmi.AbstractConnectorClient.invoke(AbstractConnectorClient.java:110)
    at $Proxy31.getAttribute(Unknown Source)
    at com.sapmarkets.bam.application.logdepot.AbstractLogDepot.getAttribute(AbstractLogDepot.java:236)
    at com.sapmarkets.bam.application.logdepot.AbstractLogDepot.getLogDescriptors(AbstractLogDepot.java:84)
    at com.sapmarkets.bam.view.config.RemoteViewConfiguration.initializeViewConfiguration(RemoteViewConfiguration.java:65)
    at com.sapmarkets.bam.view.overview.OverviewFacade.populateOverview(OverviewFacade.java:219)
    at com.sapmarkets.bam.view.AbstractLogViewerAppplication.populateOverview(AbstractLogViewerAppplication.java:171)
    at com.sapmarkets.bam.view.AbstractLogViewerAppplication.initOverview(AbstractLogViewerAppplication.java:652)
    at com.sapmarkets.bam.j2ee.services.logviewer.gui.LogViewerRuntimeLogical.setRuntime(LogViewerRuntimeLogical.java:121)
    at com.sapmarkets.bam.j2ee.services.logviewer.gui.LogViewerRuntimeLogical.show(LogViewerRuntimeLogical.java:88)
    at com.sap.engine.services.adminadapter.gui.node.ServiceNodeView.selectSingleService(ServiceNodeView.java:202)
    at com.sap.engine.services.adminadapter.gui.node.ServiceNodeView.selectNode(ServiceNodeView.java:156)
    at com.sap.engine.services.adminadapter.gui.AdminManager.selectServiceNode(AdminManager.java:290)
    at com.sap.engine.services.adminadapter.gui.AdminManager.selectNode(AdminManager.java:170)
    at com.sap.engine.services.adminadapter.gui.AdminManager.valueChanged(AdminManager.java:108)
    at javax.swing.JTree.fireValueChanged(JTree.java:2392)
    at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:2763)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1076)
    at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
    at javax.swing.JTree.setSelectionInterval(JTree.java:2041)
    at javax.swing.plaf.basic.BasicTreeUI$TreeIncrementAction.actionPerformed(BasicTreeUI.java:3268)
    at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1530)
    at javax.swing.JComponent.processKeyBinding(JComponent.java:2438)
    at javax.swing.JComponent.processKeyBindings(JComponent.java:2473)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2401)
    at java.awt.Component.processEvent(Component.java:4978)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3684)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3546)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1713)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:627)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:831)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:741)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:592)
    at java.awt.Component.dispatchEventImpl(Component.java:3575)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3546)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Caused by: java.lang.reflect.InvocationTargetException
    at com.sapmarkets.bam.util.FutureResult.get(FutureResult.java:71)
    at com.sapmarkets.bam.jmx.connector.rmi.AbstractConnectorClient.invoke(AbstractConnectorClient.java:104)
    ... 45 more
    Caused by: java.lang.OutOfMemoryError: Java heap space
    at javax.management.ObjectName.construct(ObjectName.java:385)
    at javax.management.ObjectName.readObject(ObjectName.java:1063)
    at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1736)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at java.util.ArrayList.readObject(ArrayList.java:559)
    at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1736)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    at java.util.HashMap.readObject(HashMap.java:1015)
    at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1736)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1835)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1759)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
    The lines I marked in bold are the ones that caught my attention. What is this error and how can I fix it?

    Hello, thanks for your answers. I checked the JVM Heap size, we are using a 64 bit HW, and it was already set to 2048M, as well as both parameters Xms and Xmx. I also checked our virtual memory and directory space, the virtual memory looks fine, and the <SID> directory uses 5 GB of space.
    If you wish, I can write the configuration found on the Config Tool, where you set the JVM Heap size and other parameters.

  • Use of LOG MINER - VERY URGENT

    Hello,
    I have a situation:
    I want to recover the database till Friday (Last week).
    I am ready to loose the data of Sat/Sun/Mon and Tuesday.
    In other words, I need to get the Friday's database state. I have backups of last 30 days. My database is running in archivelog mode.
    Can I use the LOGMINER to go back to the Friday's state? If yes then HOW? I have never used the Log miner neither I have been involved in the recovery, so pleaes guide me!!!
    If anyone knows the answer and the methodology can they suggest it to me? It will be a greate help!!!!
    Thanks in advance.
    Himanshu

    Hi,
    you got it wrong as you think that you will able to go back on friday's database state through logminer.i would say that logminer is used to get the information from the redo log as it got the historic changes about the database,so log miner is used for variety of purposes.
    1.the cahnges made to the database (insert,update,delete,ddl)
    2.the scn at which the changes were made.
    3.the scn at which the changes were commited.
    4.the name of the user who issued the the changes etc.
    so you can get these information by using log miner either throgh command based utility or oem.log miner gives you a pin point information.assume that if you don't know the time and name of the dropped table what would you do to get around these sort of problem.
    you can do one thing with log miner is that you cab get scn no of corrosponding changes which dropped the table.
    and you can restore your database prior to thaat scn no.
    suppode you get the scn no abc of that changes.
    then
    run {
    set until scn (the no u get through log miner );
    restore database ;
    recover database ;
    you get the disired state of database which you willing to accomplish.
    i still feel that your one question remain unanswerd.in which is you saying that i diden't recieve the media failure and your database is still up and running smothly.
    so dear i would love to tell you if want to performa theses sort of recoveries then you need to restore your database this is mendetory.the reason is "trancation activity can only be rolled forward to desired time not rolled back to desired time this is why you need to restore all your database files to back in desired time."
    thanks..

  • How to prevent java.util.logging from displaying pop-up dialog on SEVERE?

    Hi,
    I'm new to using java.util.logging. I notice that whenever I try to make a call to logger.SEVERE(msg) or logger.WARNING(msg), not only does it write the output to file (which I want), but it also pops up a dialog box displaying the exception. I don't want this pop up to appear. How do I prevent the logger from doing this?

    What are you talking about?
    Hello,
    In order to better assist you with your issue please provide us with a screenshot. If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thank you!

  • Using java.util.logging Properly

    Hello,
    I have implemented java.util.logging in my application by creating a kind of "wrapper" class that I call for handling logging. It doesn't extend the logging classes, it just provides an object with helper methods that I can call when I want it.
    public class LogCleanerLogger {
        private static final String cleanerLogfile = "logcleanerlog%g.txt";
        private static final String loggerName = "LogCleaner";
        private Logger cleanerLogger = null;
        public LogCleanerLogger() throws IOException{
            this.cleanerLogger = Logger.getLogger(getLoggerName());
            cleanerLogger.setUseParentHandlers(false);
            FileHandler logFile = new FileHandler(getCleanerLogfile(),10000,1, true);
            logFile.setFormatter(new SimpleFormatter());
            cleanerLogger.addHandler(logFile);
        public void writeLogInfoMessage(String message){
            cleanerLogger.info(message);
        public void writeLogWarningMessage(String message){
            cleanerLogger.warning(message);
        public void writeLogErrorMessage(String message){
            cleanerLogger.severe(message);
    // getters and setters
    } // end class    This all works quite happily and I can log any information I want. Except for one thing -- my log directory ends up with the log file (logcleanerlog0.txt) and a list of what appear to be temporary logs, e.g. logcleanerlog0.txt.1, logcleanerlog0.txt.2, and so on. Each increment of the number corresponds to a log file that has progressively less information in it that the previous one. At the top level, the unnumbered log, logcleanerlog0.txt, has all the logged information in it.
    I cannot make out, from reading the API and other documentation, how I can get rid of these other files, which appear to me to be temporary files used in the construction of the top level file.
    Can someone help me by explaining the mechanism for generating these files and either (a) how I can get rid of them altogether or (b) how I can arrange for them to be generated in a temp dir, while keeping the main log in the present directory (application root).
    Or perhaps there is a "better way" (that is equally as easy, of course ;-).
    Thanks.
    mp

    are you sure you cannot use the classes from a newer
    version. You can put those classes in your own
    directory. If there ar some other classes that need to
    be from the newer version, you can include them, also
    in your project. It is important that your project
    directory to be placed in the classpath variable
    before the jdk jars.
    (this solution might not work)I doubt that is worth trying.
    First, although it probably does not apply in this case, you are not allowed to distribute part of a JVM. So you could never use this solution in a commercial application.
    Secondly the Java API does change. And every execution path that might use the changed code would have to be tested. That is going to take a lot of work. Keep in mind that the logging api uses java.lang.String and java.lang.String definitely changed in 1.4 and almost every class in the Java API uses it.

  • Using the java.util.logging in JDK1.3

    I would like to use the java.util.logging classes of JDK1.4 in JDK1.3. So I tried creating a new jar with only the java.util.logging package, however, javac generates the error:
    >>>>>>
    bad class file: E:\ThinClient\Log\logging.jar(java/util/logging/Logger.class)
    class file has wrong version 48.0, should be 47.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    <<<<<<<
    I tried placing the jar both in classpath and bootclasspath during javac and still was not successful, is there any way of getting around this, other than re-implementing this or getting some third parties implementation such as Apache's log4j?

    check out Lumberjack in sourceForge

  • How to access sharepoint logs using Java?

    Is there a way to access Sharepoint logs using Java from a remote machine? 
    Any help / pointers would be appreciated. Thanks.

    Hello,
    I am not aware about any client modal class for log but if you create your own service and host in SP server then you can call this web service in JAVA. (i am not sure whether JAVA supports .NET web service or not).
    You can refer this for web service:
    http://www.arboundy.com/2010/12/centalised-view-of-sharepoint-uls-log-files/
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Doubt in java.util.logging

    Hi,
    I have doubt in logging api provided in java 1.4.
    I have a simple program to get the logger and output log into it.
    This is how the program looks.
    LogTest.java
    import java.util.logging.*;
    import java.util.*;
    public class LogTest {
    public static void main(String args[]) {
         LogManager manager = LogManager.getLogManager();
         Logger l = manager.getLogger("global");
         System.out.println(l);
         l.severe("Test");
         System.out.println(manager.getLogger("ivy"));
         System.out.println(manager.getLogger("test"));
    I able to get the instance of the global logger, but im not able to get instance of other logger. I getting null for all the other logger
    test.properites
    =================
    handlers = java.util.logging.ConsoleHandler
    java.util.logging.ConsoleHandler.level=INFO
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    ivy.level = INFO
    .ivy.level = INFO
    =================
    Compilation Command
    java -Djava.util.logging.config.file=C:\WorkSpace\test.properties LogTest Output:
    java.util.logging.Logger@13f5d07
    Jan 25, 2006 7:19:24 PM LogTest main
    SEVERE: Test
    null
    null
    I also tried the same with no config properties, Still im getting the null for logger.
    Can I know is there anything that im missing. Is there any property that must be set or do i hav set some config properties.
    Thanks,
    Siva

    Well, basically that's part of the formatdefinition
    that Properties uses. If you don't do it, then you
    aren't really using Properties format and you'llhave
    to do your own IO.Thanks for the reply. Is there anyother api or class
    that can be used to resolve my problem.What is the problem? A character is escaped, but you will get : when you read the value. You don't have a problem as long as all reading / writing is done through that class.

  • Java.util.logging - Problem with setting different Levels for each Handler

    Hello all,
    I am having issues setting up the java.util.logging system to use multiple handlers.
    I will paste the relevant code below, but basically I have 3 Handlers. One is a custom handler that opens a JOptionPane dialog with the specified error, the others are ConsoleHandler and FileHandler. I want Console and File to display ALL levels, and I want the custom handler to only display SEVERE levels.
    As it is now, all log levels are being displayed in the JOptionPane, and the Console is displaying duplicates.
    Here is the code that sets up the logger:
    logger = Logger.getLogger("lib.srr.applet");
    // I have tried both with and without the following statement          
    logger.setLevel(Level.ALL);
    // Log to file for all levels FINER and up
    FileHandler fh = new FileHandler("mylog.log");
    fh.setFormatter(new SimpleFormatter());
    fh.setLevel(Level.FINER);
    // Log to console for all levels FINER and up
    ConsoleHandler ch = new ConsoleHandler();
    ch.setLevel(Level.FINER);
    // Log SEVERE levels to the User, through a JOptionPane message dialog
    SRRUserAlertHandler uah = new SRRUserAlertHandler();
    uah.setLevel(Level.SEVERE);
    uah.setFormatter(new SRRUserAlertFormatter());
    // Add handlers
    logger.addHandler(fh);
    logger.addHandler(ch);
    logger.addHandler(uah);
    logger.info(fh.getLevel().toString() + " -- " + ch.getLevel().toString() + " -- " + uah.getLevel().toString());
    logger.info("Logger Initialized.");Both of those logger.info() calls displays to the SRRUserAlertHandler, despite the level being set to SEVERE.
    The getLevel calls displays the proper levels: "FINER -- FINER -- SEVERE"
    When I start up the applet, I get the following in the console:
    Apr 28, 2009 12:01:34 PM lib.srr.applet.SRR initLogger
    INFO: FINER -- FINER -- SEVERE
    Apr 28, 2009 12:01:34 PM lib.srr.applet.SRR initLogger
    INFO: FINER -- FINER -- SEVERE
    Apr 28, 2009 12:01:40 PM lib.srr.applet.SRR initLogger
    INFO: Logger Initialized.
    Apr 28, 2009 12:01:40 PM lib.srr.applet.SRR initLogger
    INFO: Logger Initialized.
    Apr 28, 2009 12:01:41 PM lib.srr.applet.SRR init
    INFO: Preparing Helper Files.
    Apr 28, 2009 12:01:41 PM lib.srr.applet.SRR init
    INFO: Preparing Helper Files.
    Apr 28, 2009 12:01:42 PM lib.srr.applet.SRR init
    INFO: Getting PC Name.
    Apr 28, 2009 12:01:42 PM lib.srr.applet.SRR init
    INFO: Getting PC Name.
    Apr 28, 2009 12:01:42 PM lib.srr.applet.SRR init
    INFO: Finished Initialization.
    Apr 28, 2009 12:01:42 PM lib.srr.applet.SRR init
    INFO: Finished Initialization.Notice they all display twice. Each of those are also being displayed to the user through the JOptionPane dialogs.
    Any ideas how I can properly set this up to send ONLY SEVERE to the user, and FINER and up to the File/Console?
    Thanks!
    Edit:
    Just in case, here is the code for my SRRUserAlertHandler:
    public class SRRUserAlertHandler extends Handler {
         public void close() throws SecurityException {
         public void flush() {
         public void publish(LogRecord arg0) {
              JOptionPane.showMessageDialog(null, arg0.getMessage());
    }Edited by: compbry15 on Apr 28, 2009 9:44 AM

    For now I have fixed the issue of setLevel not working by making a Filter class:
    public class SRRUserAlertFilter implements Filter {
         public boolean isLoggable(LogRecord arg0) {
              if (arg0.getLevel().intValue() >= Level.WARNING.intValue()) {
                   System.err.println(arg0.getLevel().intValue() + " -- " + Level.WARNING.intValue());
                   return true;
              return false;
    }My new SRRUserAlertHandler goes like this now:
    public class SRRUserAlertHandler extends Handler {
         public void close() throws SecurityException {
         public void flush() {
         public void publish(LogRecord arg0) {
              Filter theFilter = this.getFilter();
              if (theFilter.isLoggable(arg0))
                   JOptionPane.showMessageDialog(null, arg0.getMessage());
    }This is ugly as sin .. but I cannot be required to change an external config file when this is going in an applet.
    After much searching around, this logging api is quite annoying at times. I have seen numerous other people run into problems with it not logging specific levels, or logging too many levels, etc. A developer should be able to complete configure the system without having to modify external config files.
    Does anyone else have another solution?

  • OracleLog.properties for java.util.logging

    In the Oracle JDBC FAQ the answer to the question "How do I configure java.util.logging to get useful trace output from Oracle JDBC?" <http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#36_03> mentions the file "OracleLog.properties" provided in the "demo.zip" file.
    I cannot find the file "OracleLog.properties" anywhere?
    Any suggestions?
    Kindest Regards,
    Gerhard Hofmann

    It seems a logger instance HAS been created for my Test class, I've added the lines below. Though it didn't appear in the logger names enumeration.
    java.util.logging.Logger logger = java.util.logging.Logger.getLogger(name);
    System.out.println(logger.getName()+"="+logger.getLevel().getName());
    logger.severe("severe");
    logger.warning("warning");
    logger.info("info");
    logger.config("config");
    logger.fine("fine");
    logger.finer("finer");
    logger.finest("finest");Output:Test=FINEST
    6/10/2003 16:00:01 Test <init>
    SEVERE: severe
    6/10/2003 16:00:01 Test <init>
    WARNING: warning
    6/10/2003 16:00:01 Test <init>
    INFO: infoObservations:
    1) Despite my Test class having the FINEST log level, the default ConsoleHandler had log level of INFO, and hence only up to INFO logged.

  • Can't create log file with java.util.logging

    Hi,
    I have created a class to create a log file with java.util.logging
    This class works correctly as standalone (without jdev/weblogic)
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.*;
    public class LogDemo
         private static final Logger logger = Logger.getLogger( "Logging" );
         public static void main( String[] args ) throws IOException
             Date date = new Date();
             DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
             String dateStr = dateFormat.format(date);
             String logFileName = dateStr + "SEC" + ".log";
             Handler fh;          
             try
               fh = new FileHandler(logFileName);
               //fh.setFormatter(new XMLFormatter());
               fh.setFormatter(new SimpleFormatter());
               logger.addHandler(fh);
               logger.setLevel(Level.ALL);
               logger.log(Level.INFO, "Initialization log");
               // force a bug
               ((Object)null).toString();
             catch (IOException e)
                  logger.log( Level.WARNING, e.getMessage(), e );
             catch (Exception e)
                  logger.log( Level.WARNING, "Exception", e);
    }But when I use this class...
    import java.io.File;
    import java.io.IOException;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.logging.FileHandler;
    import java.util.logging.Handler;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import java.util.logging.XMLFormatter;
    public class TraceUtils
      public static Logger logger = Logger.getLogger("log");
      public static void initLogger(String ApplicationName) {
        Date date = new Date();
        DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
        String dateStr = dateFormat.format(date);
        String logFileName = dateStr + ApplicationName + ".log";
        Handler fh;
        try
          fh = new FileHandler(logFileName);
          fh.setFormatter(new XMLFormatter());
          logger.addHandler(fh);
          logger.setLevel(Level.ALL);
          logger.log(Level.INFO, "Initialization log");
        catch (IOException e)
          System.out.println(e.getMessage());
    }and I call it in a backingBean, I have the message in console but the log file is not created.
    TraceUtils.initLogger("SEC");why?
    Thanks for your help.

    I have uncommented this line in logging.properties and it works.
    # To also add the FileHandler, use the following line instead.
    handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandlerBut I have another problem:
    jdev ignore the parameters of the FileHandler method .
    And it creates a general log file with anothers log files created each time I call the method logp.
    So I play with these parameters
    fh = new FileHandler(logFileName,true);
    fh = new FileHandler(logFileName,0,1,true);
    fh = new FileHandler(logFileName,10000000,1,true);without succes.
    I want only one log file, how to do that?

  • Java.util.logging in 10.1.2

    Hi all. We have a j2ee application deployed on Oracle Application Server Containers for J2EE 10g (10.1.2.0.2) (build 050812.1879). We have used the java.util.logging package for our logging and are currently only able to view those with a level of either Level.SEVERE or Level.INFO. Any ideas how to enable the other levels will be appreciated. thanks

    See: http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/sescfg004.htm#BCGHIECC for an example how to use the logging.properties file to set the logging thresholds.
    Regards, Ronald

Maybe you are looking for

  • How do I convert PDF(Acrobat 9 Pro) or INDD5 to Word?

    I need to convert our PDF output files or INDD files to Word docs for Kindle publication. The Save As doesn't convert correctly.

  • How do I know if the image is a master or a referenced file?

    I imported images into Aperture, and am now not sure whether to delete the originals (that were already on my hard drive in a photos folder). How can I tell, after having imported them, whether the images in Aperture are referenced or master? I'm jus

  • While creating function in prg unit there is an err

    Oracle forms6i Hai All i have created a function using program unit i have an error PDE-PPU107the program unit source must be declared as subprogram body or a package Pls give me solutions Thanks & regards Srikkanth.M

  • Pinwheel of death during install

    I am running Mac 10.7.5. I can download Flash just fine, but when I go to install it I get the pinwheel of death when it tries to retrieve. Any idea why this is happening? I have done the uninstall already and that didn't help. Thanks!

  • SQL Error using cachedrowSet.populate.

    Hi, I am trying to use cachedrowset to pass my result set into my jsp. I use request.setAttribute and pass my cachedrowset and in my jsp I use <jsp:usebean> tag to retrieve it. This usually works for me. However, I have one query which when I am tryi