< prev index next >

src/hotspot/share/logging/logFileStreamOutput.hpp

Print this page

 81 };
 82 
 83 class LogStderrOutput : public LogFileStreamOutput {
 84   friend class LogFileStreamInitializer;
 85  private:
 86   LogStderrOutput() : LogFileStreamOutput(stderr) {
 87     set_config_string("all=off");
 88   }
 89   virtual bool initialize(const char* options, outputStream* errstream) {
 90     return false;
 91   }
 92  public:
 93   virtual const char* name() const {
 94     return "stderr";
 95   }
 96 };
 97 
 98 extern LogStderrOutput &StderrLog;
 99 extern LogStdoutOutput &StdoutLog;
100 














101 #endif // SHARE_LOGGING_LOGFILESTREAMOUTPUT_HPP

 81 };
 82 
 83 class LogStderrOutput : public LogFileStreamOutput {
 84   friend class LogFileStreamInitializer;
 85  private:
 86   LogStderrOutput() : LogFileStreamOutput(stderr) {
 87     set_config_string("all=off");
 88   }
 89   virtual bool initialize(const char* options, outputStream* errstream) {
 90     return false;
 91   }
 92  public:
 93   virtual const char* name() const {
 94     return "stderr";
 95   }
 96 };
 97 
 98 extern LogStderrOutput &StderrLog;
 99 extern LogStdoutOutput &StdoutLog;
100 
101 class FileLocker : public StackObj {
102 private:
103     FILE *_file;
104 
105 public:
106     FileLocker(FILE *file) : _file(file) {
107       os::flockfile(_file);
108     }
109 
110     ~FileLocker() {
111       os::funlockfile(_file);
112     }
113 };
114 
115 #endif // SHARE_LOGGING_LOGFILESTREAMOUTPUT_HPP
< prev index next >