Examples of LoggingOutputStream


Examples of com.sun.common.util.logging.LoggingOutputStream

        // redirect stderr and stdout, a better way to do this
        //http://blogs.sun.com/nickstephen/entry/java_redirecting_system_out_and

        Logger _ologger = LogDomains.getLogger(LogManagerService.class, LogDomains.STD_LOGGER);
        LoggingOutputStream los = new LoggingOutputStream(_ologger, Level.INFO);
        LoggingOutputStream.LoggingPrintStream pout = los.new LoggingPrintStream(los);
        System.setOut(pout);

        Logger _elogger = LogDomains.getLogger(LogManagerService.class, LogDomains.STD_LOGGER);
        los = new LoggingOutputStream(_elogger, Level.SEVERE);
        LoggingOutputStream.LoggingPrintStream perr = los.new LoggingPrintStream(los);
        System.setErr(perr);

        /*Logger anonymousLogger = Logger.getAnonymousLogger();
       LoggingOutputStream los = new LoggingOutputStream(anonymousLogger, Level.INFO);
View Full Code Here

Examples of gluebooster.maven.io.LoggingOutputStream

  @Test
  public void testWriting() throws IOException{
   

   
    LoggingOutputStream output = new LoggingOutputStream(new SystemStreamLog());
    OutputStreamWriter writer = new OutputStreamWriter(output);
   
    writer.write("starting\n");
    writer.write("[DEBUG] this is\nthe next\nline.\n");
View Full Code Here

Examples of gluebooster.maven.io.LoggingOutputStream

         model.writeModelToXmlfile(file);
        
         //invoke validate on the pom
         String command = "cmd /c mvn --file \""+file.getCanonicalPath() + "\" validate";
         getLog().info(command);
         LoggingOutputStream output = new LoggingOutputStream(getLog());
         LoggingOutputStream error  = new LoggingOutputStream(getLog());
         Integer commandResult = DataTransfer.execCommand(command, output,  error, false);
        
         //delete the simplified pom
         getLog().info("deleting file: "+ file.delete());

         //handle and log errors
         if ((commandResult != null) && (commandResult != 0)){
          
          StringBuilder errors =  new StringBuilder(output.getErrors() + "\n" + error.getErrors());
         
          //handle error: Could not find stylesheet
          List<String> stylesheetList = StringBoostUtils.getTextBetween(errors.toString(),"Could not find stylesheet:", "->",false);
          if (! stylesheetList.isEmpty())
          {
View Full Code Here

Examples of io.fabric8.utils.LoggingOutputStream

        String branch = GitHelpers.currentBranch(git);
        LOG.info("Pushing deployment changes to branch " + branch
                + " credentials " + credentials + " for container " + container.getId());
        try {
            Iterable<PushResult> results = git.push().setCredentialsProvider(credentials).setRefSpecs(new RefSpec(branch))
                    .setOutputStream(new LoggingOutputStream(LOG)).call();
/*
            for (PushResult result : results) {
                LOG.info(result.getMessages());
            }
*/
 
View Full Code Here

Examples of net.md_5.bungee.log.LoggingOutputStream

        AnsiConsole.systemInstall();
        consoleReader = new ConsoleReader();
        consoleReader.setExpandEvents( false );

        logger = new BungeeLogger( this );
        System.setErr( new PrintStream( new LoggingOutputStream( logger, Level.SEVERE ), true ) );
        System.setOut( new PrintStream( new LoggingOutputStream( logger, Level.INFO ), true ) );

        if ( consoleReader.getTerminal() instanceof UnsupportedTerminal )
        {
            logger.info( "Unable to initialize fancy terminal. To fix this on Windows, install the correct Microsoft Visual C++ 2008 Runtime" );
            logger.info( "NOTE: This error is non crucial, and BungeeCord will still function correctly! Do not bug the author about it unless you are still unable to get it working" );
View Full Code Here

Examples of org.jboss.stdio.LoggingOutputStream

        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));

        create(args, in, out, err, authKey);
View Full Code Here

Examples of org.jboss.stdio.LoggingOutputStream

        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));

        create(args, in, out, err, authKey);
View Full Code Here

Examples of org.jboss.stdio.LoggingOutputStream

        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));

        create(args, in, out, err, authKey);
View Full Code Here

Examples of org.jboss.stdio.LoggingOutputStream

        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(org.jboss.logmanager.Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(org.jboss.logmanager.Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));

        final byte[] authKey = new byte[16];
        try {
View Full Code Here

Examples of org.jboss.stdio.LoggingOutputStream

    public static void main(String[] args) {
        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));

        // TODO: privileged block
        System.setProperty("log4j.defaultInitOverride", "true");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.