< prev index next >

src/hotspot/share/logging/logFileStreamOutput.hpp

Print this page

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














105 #endif // SHARE_LOGGING_LOGFILESTREAMOUTPUT_HPP

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