mil.dod.th.ose.logging/src/mil/dod/th/ose/logging/LogWriter.java
@Activate
    public void activate(final BundleContext context, final Map<String, Object> props)
    {
        m_Context = context;
        updateProps(props);
        final String logdir = m_Context.getProperty(LOG_DIR_PROPERTY);
        if (logdir != null)
        {
            m_LogFileDir = new File(logdir);

            if (!m_LogFileDir.exists() && !m_LogFileDir.mkdir())
            {
                throw new IllegalStateException("Unable to create directory used to stored log files!");
            }
            openLogFile();
        }
        final String logStdOut = m_Context.getProperty(LOG_STDOUT_PROPERTY);
        if ((logStdOut != null) && !setLogStdOut(logStdOut))
        {
            System.err.println(String.format(// NOPMD: System.out is necessary for the logging implementation
                    "Invalid %s property key (%s).  LogStdOut defaulting to %s.  Valid values are TRUE or FALSE",
                    LOG_STDOUT_PROPERTY, logStdOut, m_LogStdOut));
        }

        final String logExceptions = m_Context.getProperty(LOG_EXCEPTIONS_PROPERTY);
        if ((logExceptions != null) && !setLogExceptions(logExceptions))
        {
            System.err.println(String.format(// NOPMD: System.out is necessary for the logging implementation
                    "Invalid %s property key (%s).  LogExceptions defaulting to %s.  Valid values are TRUE or FALSE",
                    LOG_EXCEPTIONS_PROPERTY, logExceptions, m_LogExceptions));
        }

        processFiltersFromFrameworkProps();
        
        // Get existing log entries (in order by newest) and log each entry
        @SuppressWarnings("unchecked")
        final Enumeration<LogEntry> logEntries = m_LogReader.getLog();
        final List<LogEntry> logList = Collections.list(logEntries);
        for (int i = logList.size() - 1; i >= 0; --i)
        {
            logged(logList.get(i));
        }
    }
/**
     * Activate the component. At this point all service dependencies have been satisfied.
     * 
     * @param context
     *            OSGi bundle context
     * @param props
     *            Configuration Map
     */
Activate the component. At this point all service dependencies have been satisfied.

@param context
OSGi bundle context
@param props
Configuration Map
Activate the component . At this point all service dependencies have been satisfied . @param context OSGi bundle context @param props Configuration Map
@Activate
    public void activate(final BundleContext context, final Map<String, Object> props)
    {
        m_Context = context;
        updateProps(props);
        final String logdir = m_Context.getProperty(LOG_DIR_PROPERTY);
        if (logdir != null)
        {
            m_LogFileDir = new File(logdir);
            if (!m_LogFileDir.exists() && !m_LogFileDir.mkdir())
            {
                throw new IllegalStateException("Unable to create directory used to stored log files!");
            }
            openLogFile();
        }
        final String logStdOut = m_Context.getProperty(LOG_STDOUT_PROPERTY);
        if ((logStdOut != null) && !setLogStdOut(logStdOut))
        {
            System.err.println(String.format(
                    "Invalid %s property key (%s).  LogStdOut defaulting to %s.  Valid values are TRUE or FALSE",
                    LOG_STDOUT_PROPERTY, logStdOut, m_LogStdOut));
        }
        final String logExceptions = m_Context.getProperty(LOG_EXCEPTIONS_PROPERTY);
        if ((logExceptions != null) && !setLogExceptions(logExceptions))
        {
            System.err.println(String.format(
                    "Invalid %s property key (%s).  LogExceptions defaulting to %s.  Valid values are TRUE or FALSE",
                    LOG_EXCEPTIONS_PROPERTY, logExceptions, m_LogExceptions));
        }
        processFiltersFromFrameworkProps();
        @SuppressWarnings("unchecked")
        final Enumeration<LogEntry> logEntries = m_LogReader.getLog();
        final List<LogEntry> logList = Collections.list(logEntries);
        for (int i = logList.size() - 1; i >= 0; --i)
        {
            logged(logList.get(i));
        }
    }
@ Activate public void activate ( final BundleContext context , final Map < String , Object > props ) { m_Context = context ; updateProps ( props ) ; final String logdir = m_Context . getProperty ( LOG_DIR_PROPERTY ) ; if ( logdir != null ) { m_LogFileDir = new File ( logdir ) ; if ( ! m_LogFileDir . exists ( ) && ! m_LogFileDir . mkdir ( ) ) { throw new IllegalStateException ( "Unable to create directory used to stored log files!" ) ; } openLogFile ( ) ; } final String logStdOut = m_Context . getProperty ( LOG_STDOUT_PROPERTY ) ; if ( ( logStdOut != null ) && ! setLogStdOut ( logStdOut ) ) { System . err . println ( String . format ( "Invalid %s property key (%s).  LogStdOut defaulting to %s.  Valid values are TRUE or FALSE" , LOG_STDOUT_PROPERTY , logStdOut , m_LogStdOut ) ) ; } final String logExceptions = m_Context . getProperty ( LOG_EXCEPTIONS_PROPERTY ) ; if ( ( logExceptions != null ) && ! setLogExceptions ( logExceptions ) ) { System . err . println ( String . format ( "Invalid %s property key (%s).  LogExceptions defaulting to %s.  Valid values are TRUE or FALSE" , LOG_EXCEPTIONS_PROPERTY , logExceptions , m_LogExceptions ) ) ; } processFiltersFromFrameworkProps ( ) ; @ SuppressWarnings ( "unchecked" ) final Enumeration < LogEntry > logEntries = m_LogReader . getLog ( ) ; final List < LogEntry > logList = Collections . list ( logEntries ) ; for ( int i = logList . size ( ) - 1 ; i >= 0 ; -- i ) { logged ( logList . get ( i ) ) ; } }
Activate the component.
Activate the component .
// NOPMD: System.out is necessary for the logging implementation // NOPMD: System.out is necessary for the logging implementation // Get existing log entries (in order by newest) and log each entry