Package com.caucho.log

Examples of com.caucho.log.RotateStream


    if (! logPath.canWrite()) {
      throw new ConfigException("Cannot open " + logPath.getNativePath()
                                + " required for Resin start. Please check permissions");
    }

    RotateStream logStream = RotateStream.create(logPath);
    logStream.setRolloverSize(64L * 1024 * 1024);
    logStream.init();
    WriteStream out = logStream.getStream();
    out.setDisableClose(true);

    EnvironmentStream.setStdout(out);
    EnvironmentStream.setStderr(out);

View Full Code Here


    if (_watchdog.getStdoutLog() != null)
      _watchdog.getStdoutLog().configure(log);

    log.init();
   
    RotateStream rotateStream = log.getRotateStream();

    // _watchdog.getConfig().logInit(rotateStream);
   
    // rotateStream.init();
    return rotateStream.getStream();
  }
View Full Code Here

      if (i + 1 < len
          && (argv[i].equals("-stdout")
              || argv[i].equals("--stdout"))) {
        Path path = Vfs.lookup(argv[i + 1]);

        RotateStream stream = RotateStream.create(path);
        stream.init();
        WriteStream out = stream.getStream();
        out.setDisableClose(true);

        EnvironmentStream.setStdout(out);

        i += 2;
      }
      else if (i + 1 < len
               && (argv[i].equals("-stderr")
                   || argv[i].equals("--stderr"))) {
        Path path = Vfs.lookup(argv[i + 1]);

        RotateStream stream = RotateStream.create(path);
        stream.init();
        WriteStream out = stream.getStream();
        out.setDisableClose(true);

        EnvironmentStream.setStderr(out);

        i += 2;
View Full Code Here

      }
    } catch (Exception e) {
      log.log(Level.FINE, e.toString(), e);
    }

    RotateStream rotateStream = RotateStream.create(jvmPath);
    rotateStream.getRolloverLog().setRolloverSizeBytes(64L * 1024 * 1024);
    _watchdog.getConfig().logInit(rotateStream);
    rotateStream.init();
    return rotateStream.getStream();
  }
View Full Code Here

   
    boolean isLogDirectoryExists = getLogDirectory().exists();

    Path logPath = getLogDirectory().lookup("watchdog-manager.log");

    RotateStream logStream = RotateStream.create(logPath);
    logStream.init();
    WriteStream out = logStream.getStream();
    out.setDisableClose(true);

    EnvironmentStream.setStdout(out);
    EnvironmentStream.setStderr(out);
View Full Code Here

      if (i + 1 < len
          && (argv[i].equals("-stdout")
              || argv[i].equals("--stdout"))) {
        Path path = Vfs.lookup(argv[i + 1]);

        RotateStream stream = RotateStream.create(path);
        stream.init();
        WriteStream out = stream.getStream();
        out.setDisableClose(true);

        EnvironmentStream.setStdout(out);

        i += 2;
      }
      else if (i + 1 < len
               && (argv[i].equals("-stderr")
                   || argv[i].equals("--stderr"))) {
        Path path = Vfs.lookup(argv[i + 1]);

        RotateStream stream = RotateStream.create(path);
        stream.init();
        WriteStream out = stream.getStream();
        out.setDisableClose(true);

        EnvironmentStream.setStderr(out);

        i += 2;
View Full Code Here

TOP

Related Classes of com.caucho.log.RotateStream

Copyright © 2018 www.massapicom. 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.