3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
16 #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
17 # define ALIROOT_DEPRECATED(func) func __attribute__ ((deprecated))
18 #elif defined(_MSC_VER) && _MSC_VER >= 1300
19 # define ALIROOT_DEPRECATED(func) __declspec(deprecated) func
21 # define ALIROOT_DEPRECATED(func) func
25 * class for logging debug, info and error messages
27 class AliLog: public TObject
31 // Log4j log levels: TRACE, DEBUG, INFO, WARN, ERROR, FATAL
32 enum EType_t {kFatal = 0, kError, kWarning, kInfo, kDebug, kMaxType};
33 typedef void (*AliLogNotification)(EType_t type, const char* message );
35 // NB: singleton constructor & destructor should not be public!
36 // ALIROOT_DEPRECATED(AliLog());
37 // ALIROOT_DEPRECATED(virtual ~AliLog());
39 // NB: singleton deprecated static instance method
40 // ALIROOT_DEPRECATED(static AliLog* Instance() {return fgInstance;};)
42 // get root logger singleton instance
43 static AliLog *GetRootLogger();
45 // delete root logger singleton instance
46 static void DeleteRootLogger();
48 // NB: the following functions should not be static
49 // NB: deprecated: logging configuration should be made through to a configuration file
50 static void EnableCoreDump(Bool_t enabled);
51 static void MakeCoreDump(const char *fout);
52 static void EnableDebug(Bool_t enabled);
53 static void SetGlobalLogLevel(EType_t type);
54 static Int_t GetGlobalLogLevel();
55 static void SetGlobalDebugLevel(Int_t level);
56 static Int_t GetGlobalDebugLevel();
57 static void SetModuleDebugLevel(const char* module, Int_t level);
58 static void ClearModuleDebugLevel(const char* module);
59 static void SetClassDebugLevel(const char* className, Int_t level);
60 static void ClearClassDebugLevel(const char* className);
62 static void SetStandardOutput();
63 static void SetStandardOutput(EType_t type);
64 static void SetErrorOutput();
65 static void SetErrorOutput(EType_t type);
66 static void SetFileOutput(const char* fileName);
67 static void SetFileOutput(EType_t type, const char* fileName);
68 static void SetStreamOutput(ostream* stream);
69 static void SetStreamOutput(EType_t type, ostream* stream);
70 static void SetLogNotification(AliLogNotification pCallBack);
71 static void SetLogNotification(EType_t type, AliLogNotification pCallBack);
74 static void SetHandleRootMessages(Bool_t on);
76 static void SetPrintType(Bool_t on);
77 static void SetPrintType(EType_t type, Bool_t on);
78 static void SetPrintModule(Bool_t on);
79 static void SetPrintModule(EType_t type, Bool_t on);
80 static void SetPrintScope(Bool_t on);
81 static void SetPrintScope(EType_t type, Bool_t on);
82 static void SetPrintLocation(Bool_t on);
83 static void SetPrintLocation(EType_t type, Bool_t on);
85 static void SetPrintRepetitions(Bool_t on);
87 static void WriteToFile(const char* name, Int_t option = 0);
89 // the following public methods are used by the preprocessor macros
90 // and should not be called directly
91 static Bool_t IsDebugEnabled() {return fgDebugEnabled;}
92 static Int_t GetDebugLevel(const char* module, const char* className);
93 static void Message(UInt_t level, const char* message,
94 const char* module, const char* className,
95 const char* function, const char* file, Int_t line);
96 static void Debug(UInt_t level, const char* message,
97 const char* module, const char* className,
98 const char* function, const char* file, Int_t line);
100 static Int_t RedirectStdoutTo(EType_t type, UInt_t level, const char* module,
101 const char* className, const char* function,
102 const char* file, Int_t line, Bool_t print);
103 static Int_t RedirectStderrTo(EType_t type, UInt_t level, const char* module,
104 const char* className, const char* function,
105 const char* file, Int_t line, Bool_t print);
106 static void RestoreStdout(Int_t original);
107 static void RestoreStderr(Int_t original);
109 static ostream& Stream(EType_t type, UInt_t level,
110 const char* module, const char* className,
111 const char* function, const char* file, Int_t line);
115 // constructor is made private for implementing a singleton
120 AliLog(const AliLog& log);
121 AliLog& operator = (const AliLog& log);
123 void ReadEnvSettings();
125 static void RootErrorHandler(Int_t level, Bool_t abort,
126 const char* location, const char* message);
128 void CloseFile(Int_t type);
129 FILE* GetOutputStream(Int_t type);
131 UInt_t GetLogLevel(const char* module, const char* className) const;
132 void PrintMessage(UInt_t type, const char* message,
133 const char* module, const char* className,
134 const char* function,
135 const char* file, Int_t line);
137 void PrintString(Int_t type, FILE* stream, const char* format, ...);
138 void PrintRepetitions();
140 Int_t RedirectTo(FILE* stream, EType_t type, UInt_t level,
141 const char* module, const char* className,
142 const char* function,
143 const char* file, Int_t line, Bool_t print);
145 ostream& GetStream(EType_t type, UInt_t level,
146 const char* module, const char* className,
147 const char* function, const char* file, Int_t line);
149 enum {kDebugOffset = kDebug-1};
151 static AliLog* fgInstance; //! pointer to current instance
152 static Bool_t fgDebugEnabled; // flag for debug en-/disabling
153 static Bool_t fgCoreEnabled; // flag for core dump en-/disabling
155 UInt_t fGlobalLogLevel; // global logging level
156 TObjArray fModuleDebugLevels; // debug levels for modules
157 TObjArray fClassDebugLevels; // debug levels for classes
159 Int_t fOutputTypes[kMaxType]; // types of output streams
160 TString fFileNames[kMaxType]; // file names
161 FILE* fOutputFiles[kMaxType]; //! log output files
162 ostream* fOutputStreams[kMaxType]; //! log output streams
164 Bool_t fPrintType[kMaxType]; // print type on/off
165 Bool_t fPrintModule[kMaxType]; // print module on/off
166 Bool_t fPrintScope[kMaxType]; // print scope/class name on/off
167 Bool_t fPrintLocation[kMaxType]; // print file and line on/off
169 Bool_t fPrintRepetitions; // print number of repetitions instead of repeated message on/off
171 Int_t fRepetitions; //! counter of repetitions
172 UInt_t fLastType; //! type of last message
173 TString fLastMessage; //! last message
174 TString fLastModule; //! module name of last message
175 TString fLastClassName; //! class name of last message
176 TString fLastFunction; //! function name of last message
177 TString fLastFile; //! file name of last message
178 Int_t fLastLine; //! line number of last message
179 AliLogNotification fCallBacks[kMaxType]; //! external notification callback
181 ClassDef(AliLog, 1) // class for logging debug, info and error messages
187 # define MODULENAME() _MODULE_
189 # define MODULENAME() "NoModule"
192 // function name macro
193 #if defined(__GNUC__) || defined(__ICC) || defined(__ECC) || defined(__APPLE__)
194 # define FUNCTIONNAME() __FUNCTION__
195 // #elif defined(__HP_aCC) || defined(__alpha) || defined(__DECCXX)
196 // #define FUNCTIONNAME() __FUNC__
198 # define FUNCTIONNAME() "???"
203 * Redirect output to std::cout to specified log stream
205 * @param type Type of stream to re-direct to
206 * @param level Level of output
208 * @param whatever Any code that will output to std::cout
210 #define REDIRECTSTDOUT(type, level, scope, whatever) \
211 do {Int_t originalStdout = AliLog::RedirectStdoutTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
212 whatever; AliLog::RestoreStdout(originalStdout);} while(false)
214 * Redirect output to std::cerr to specified log stream
216 * @param type Type of stream to re-direct to
217 * @param level Level of output
219 * @param whatever Any code that will output to std::cout
221 #define REDIRECTSTDERR(type, level, scope, whatever) \
222 do {Int_t originalStderr = AliLog::RedirectStderrTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
223 whatever; AliLog::RestoreStderr(originalStderr);} while(false)
225 * Redirect output to std::cout and std::cerr to specified log stream
227 * @param type Type of stream to re-direct to
228 * @param level Level of output
230 * @param whatever Any code that will output to std::cout or std::cerr
232 #define REDIRECTSTDOUTANDSTDERR(type, level, scope, whatever) \
233 do {Int_t originalStdout = AliLog::RedirectStdoutTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
234 Int_t originalStderr = AliLog::RedirectStderrTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
235 whatever; AliLog::RestoreStderr(originalStderr); AliLog::RestoreStdout(originalStdout);} while(false)
240 # define AliDebugLevel() -1
241 # define AliDebugLevelClass() -1
242 # define AliDebugLevelGeneral(scope) -1
245 * Get the object scope debug level
247 # define AliDebugLevel() ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), ClassName()) : -1)
249 * Get the class (ROOT-enabled) debug level
251 # define AliDebugLevelClass() ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) : -1)
253 * Get the debug level associated with scope
256 # define AliDebugLevelGeneral(scope) ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), scope) : -1)
261 # define AliDebug(level, message) do { } while (false)
262 # define AliDebugClass(level, message) do { } while (false)
263 # define AliDebugGeneral(scope, level, message) do { } while (false)
264 # define AliDebugF(level, message,...) do { } while (false)
265 # define AliDebugClassF(level, message,...) do { } while (false)
266 # define AliDebugGeneralF(scope, level, message,...) do { } while (false)
269 // inspired by log4cxx code (see log4cxx/Logger.h)
270 // implements GCC branch prediction for increasing logging performance
271 # if !defined(ALIROOT_UNLIKELY)
272 # if defined(__GNUC__) && (__GNUC__ >= 3)
274 * Provides optimization hint to the compiler
275 * to optimize for the expression being false.
276 * @param expr boolean expression.
277 * @returns value of expression.
279 # define ALIROOT_UNLIKELY(expr) __builtin_expect(expr, 0)
282 * Provides optimization hint to the compiler
283 * to optimize for the expression being false.
284 * @param expr boolean expression.
285 * @returns value of expression.
287 # define ALIROOT_UNLIKELY(expr) expr
293 * Logs a message to a specified logger with the DEBUG level.
295 * @param logLevel the debug level.
296 * @param message message to print in the following format: Form(message).
297 * Note, that message should contain balanced parenthesis, like
298 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
300 # define AliDebug(logLevel, message) \
301 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), ClassName()) >= logLevel)) {\
302 AliLog::Debug(logLevel, message, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
305 * Logs a message to a specified logger with the DEBUG level. For use
306 * in static member functions of a class
308 * @param logLevel the debug level.
309 * @param message message to print in the following format: Form(message).
310 * Note, that message should contain balanced parenthesis, like
311 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
313 # define AliDebugClass(logLevel, message) \
314 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) >= logLevel)) {\
315 AliLog::Debug(logLevel, message, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
318 * Logs a message to a specified logger with the DEBUG level. For use
319 * in non-ROOT-enabled-class scope.
321 * @param scope the logging scope.
322 * @param logLevel the debug level.
323 * @param message message to print in the following format: Form(message).
324 * Note, that message should contain balanced parenthesis, like
325 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
327 # define AliDebugGeneral(scope, logLevel, message) \
328 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), scope) >= logLevel)) {\
329 AliLog::Debug(logLevel, message, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
331 * Macro to output debugging information. This excepts a printf-like
332 * format statement. Note, at least 3 arguments (in total) must be
335 * @param logLevel Debug level
336 * @param format Printf-like format.
338 # define AliDebugF(logLevel,format,...) \
339 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), ClassName()) >= logLevel)) { \
340 TString m;m.Form(format,__VA_ARGS__); \
341 AliLog::Debug(logLevel, m, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
343 * Outut debug information, filtered on debug level. For use in
344 * static member function of a ROOT-enabled class. This excepts a
345 * printf-like format statement. Note, at least 3 arguments (in
346 * total) must be passed.
348 * @param logLevel Debug level
349 * @param format Printf-like format
353 # define AliDebugClassF(logLevel,format,...) \
354 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) >= logLevel)) { \
355 TString m;m.Form(format,__VA_ARGS__); \
356 AliLog::Debug(logLevel, m, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
358 * Outut debug information, filtered on debug level. For use in
359 * static member function of a non-ROOT-enabled class-scope. This
360 * excepts a printf-like format statement. Note, at least 3 arguments
361 * (in total) must be passed.
364 * @param logLevel Debug level
365 * @param format Printf-like format
369 # define AliDebugGeneralF(scope,logLevel,format,...) \
370 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), scope) >= logLevel)) { \
371 TString m;m.Form(format,__VA_ARGS__); \
372 AliLog::Debug(logLevel, m, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
376 // redirection to debug
377 #define StdoutToAliDebug(level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, ClassName(), whatever)
378 #define StderrToAliDebug(level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, ClassName(), whatever)
379 #define ToAliDebug(level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, ClassName(), whatever)
380 #define StdoutToAliDebugClass(level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, Class()->GetName(), whatever)
381 #define StderrToAliDebugClass(level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, Class()->GetName(), whatever)
382 #define ToAliDebugClass(level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, Class()->GetName(), whatever)
383 #define StdoutToAliDebugGeneral(scope, level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, scope, whatever)
384 #define StderrToAliDebugGeneral(scope, level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, scope, whatever)
385 #define ToAliDebugGeneral(scope, level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, scope, whatever)
387 // debug stream objects
388 #define AliDebugStream(level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
389 #define AliDebugClassStream(level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
390 #define AliDebugGeneralStream(scope, level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
394 * Macro that will output stuff using the logging facilities.
396 * @param lvl Message level
397 * @param message Message to show
399 #define AliMessage(lvl,message) do { \
400 AliLog::Message(lvl, message, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
402 * Macro that will output stuff using the logging facilities.
403 * For use in static member function of ROOT-enabled class-scope.
405 * @param lvl Message level
406 * @param message Message to show
408 #define AliMessageClass(lvl,message) do { \
409 AliLog::Message(lvl, message, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
411 * Macro that will output stuff using the logging facilities.
412 * For use in non-ROOT-enabled class-scope.
415 * @param lvl Message level
416 * @param message Message to show
418 #define AliMessageGeneral(scope,lvl,message) do { \
419 AliLog::Message(lvl, message, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
421 * Print a message using the AliLog logging facility. This macro
422 * accepts printf-like format arguments. Note, at least 3 arguments
425 * AliMessageF(1, "foo"); // <-- Failes
426 * AliMessageF(1, "foo %d", 42); // <-- OK
429 * @param lvl Message level
430 * @param format printf-like format
432 #define AliMessageF(lvl,format,...) do { \
433 TString m; m.Form(format,__VA_ARGS__); \
434 AliLog::Message(lvl, m, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
436 * Print a message using the AliLog logging facility. This macro
437 * accepts printf-like format arguments. Note, at least 3 arguments
440 * AliMessageF(1, "foo"); // <-- Failes
441 * AliMessageF(1, "foo %d", 42); // <-- OK
444 * This is for static member function in for ROOT-enabled class-scope
446 * @param lvl Message level
447 * @param format printf-like format
449 #define AliMessageClassF(lvl,format,...) do { \
450 TString m; m.Form(format,__VA_ARGS__); \
451 AliLog::Message(lvl, m, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
453 * Print a message using the AliLog logging facility. This macro
454 * accepts printf-like format arguments. Note, at least 3 arguments
457 * AliMessageF(1, "foo"); // <-- Failes
458 * AliMessageF(1, "foo %d", 42); // <-- OK
461 * This is for non-ROOT-enabled class-scope
464 * @param lvl Message level
465 * @param format printf-like format
467 #define AliMessageGeneralF(scope,lvl,format,...) do { \
468 TString m; m.Form(format,__VA_ARGS__); \
469 AliLog::Message(lvl, m, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
473 # define AliInfo(message) do { } while (false)
474 # define AliInfoClass(message) do { } while (false)
475 # define AliInfoGeneral(scope, message) do { } while (false)
476 # define AliInfoF(message,...) do { } while (false)
477 # define AliInfoClassF(message,...) do { } while (false)
478 # define AliInfoGeneralF(scope, message,...) do { } while (false)
481 * Forwards to AliMessage with log level of AliLog::kInfo
484 # define AliInfo(message) AliMessage(AliLog::kInfo, message)
486 * Forwards to AliMessageClass with log level of AliLog::kInfo
487 * @see AliMessageClass
489 # define AliInfoClass(message) AliMessageClass(AliLog::kInfo, message)
491 * Forwards to AliMessageGeneral with log level of AliLog::kInfo
492 * @see AliMessageGeneral
494 # define AliInfoGeneral(scope, message) AliMessageGeneral(scope, AliLog::kInfo, message)
496 * Forwards to AliMessageF with log level of AliLog::kInfo
499 # define AliInfoF(message,...) AliMessageF(AliLog::kInfo, message, __VA_ARGS__)
501 * Forwards to AliMessageClassF with log level of AliLog::kInfo
502 * @see AliMessageClassF
504 # define AliInfoClassF(message,...) AliMessageClassF(AliLog::kInfo, message, __VA_ARGS__)
506 * Forwards to AliMessageGeneralF with log level of AliLog::kInfo
507 * @see AliMessageGeneralF
509 # define AliInfoGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kInfo, message, __VA_ARGS__)
512 // redirection to info
513 #define StdoutToAliInfo(whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, ClassName(), whatever)
514 #define StderrToAliInfo(whatever) REDIRECTSTDERR(AliLog::kInfo, 0, ClassName(), whatever)
515 #define ToAliInfo(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, ClassName(), whatever)
516 #define StdoutToAliInfoClass(whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, Class()->GetName(), whatever)
517 #define StderrToAliInfoClass(whatever) REDIRECTSTDERR(AliLog::kInfo, 0, Class()->GetName(), whatever)
518 #define ToAliInfoClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, Class()->GetName(), whatever)
519 #define StdoutToAliInfoGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, scope, whatever)
520 #define StderrToAliInfoGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kInfo, 0, scope, whatever)
521 #define ToAliInfoGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, scope, whatever)
523 // info stream objects
524 #define AliInfoStream() AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
525 #define AliInfoClassStream() AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
526 #define AliInfoGeneralStream(scope) AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
529 #ifdef LOG_NO_WARNING
530 # define AliWarning(message) do { } while (false)
531 # define AliWarningClass(message) do { } while (false)
532 # define AliWarningGeneral(scope, message) do { } while (false)
533 # define AliWarningF(message,...) do { } while (false)
534 # define AliWarningClassF(message,...) do { } while (false)
535 # define AliWarningGeneralF(scope, message,...) do { } while (false)
538 * Forwards to AliMessage with log level of AliLog::kWarning
541 # define AliWarning(message) AliMessage(AliLog::kWarning, message)
543 * Forwards to AliMessageClass with log level of AliLog::kWarning
544 * @see AliMessageClass
546 # define AliWarningClass(message) AliMessageClass(AliLog::kWarning, message)
548 * Forwards to AliMessageGeneral with log level of AliLog::kWarning
549 * @see AliMessageGeneral
551 # define AliWarningGeneral(scope, message) AliMessageGeneral(scope, AliLog::kWarning, message)
553 * Forwards to AliMessageF with log level of AliLog::kWarning
556 # define AliWarningF(message,...) AliMessageF(AliLog::kWarning, message, __VA_ARGS__)
558 * Forwards to AliMessageClassF with log level of AliLog::kWarning
559 * @see AliMessageClassF
561 # define AliWarningClassF(message,...) AliMessageClassF(AliLog::kWarning, message, __VA_ARGS__)
563 * Forwards to AliMessageGeneralF with log level of AliLog::kWarning
564 * @see AliMessageGeneralF
566 # define AliWarningGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kWarning, message, __VA_ARGS__)
569 // redirection to warning
570 #define StdoutToAliWarning(whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, ClassName(), whatever)
571 #define StderrToAliWarning(whatever) REDIRECTSTDERR(AliLog::kWarning, 0, ClassName(), whatever)
572 #define ToAliWarning(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, ClassName(), whatever)
573 #define StdoutToAliWarningClass(whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, Class()->GetName(), whatever)
574 #define StderrToAliWarningClass(whatever) REDIRECTSTDERR(AliLog::kWarning, 0, Class()->GetName(), whatever)
575 #define ToAliWarningClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, Class()->GetName(), whatever)
576 #define StdoutToAliWarningGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, scope, whatever)
577 #define StderrToAliWarningGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kWarning, 0, scope, whatever)
578 #define ToAliWarningGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, scope, whatever)
580 // warning stream objects
581 #define AliWarningStream() AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
582 #define AliWarningClassStream() AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
583 #define AliWarningGeneralStream(scope) AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
588 * Forwards to AliMessage with log level of AliLog::kError
591 #define AliError(message) AliMessage(AliLog::kError, message)
593 * Forwards to AliMessageClass with log level of AliLog::kError
594 * @see AliMessageClass
596 #define AliErrorClass(message) AliMessageClass(AliLog::kError, message)
598 * Forwards to AliMessageGeneral with log level of AliLog::kError
599 * @see AliMessageGeneral
601 #define AliErrorGeneral(scope, message) AliMessageGeneral(scope, AliLog::kError, message)
603 * Forwards to AliMessageF with log level of AliLog::kError
606 #define AliErrorF(message,...) AliMessageF(AliLog::kError, message, __VA_ARGS__)
608 * Forwards to AliMessageClassF with log level of AliLog::kError
609 * @see AliMessageClassF
611 #define AliErrorClassF(message,...) AliMessageClassF(AliLog::kError, message, __VA_ARGS__)
613 * Forwards to AliMessageGeneralF with log level of AliLog::kError
614 * @see AliMessageGeneralF
616 #define AliErrorGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kError, message, __VA_ARGS__)
618 // redirection to error
619 #define StdoutToAliError(whatever) REDIRECTSTDOUT(AliLog::kError, 0, ClassName(), whatever)
620 #define StderrToAliError(whatever) REDIRECTSTDERR(AliLog::kError, 0, ClassName(), whatever)
621 #define ToAliError(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, ClassName(), whatever)
622 #define StdoutToAliErrorClass(whatever) REDIRECTSTDOUT(AliLog::kError, 0, Class()->GetName(), whatever)
623 #define StderrToAliErrorClass(whatever) REDIRECTSTDERR(AliLog::kError, 0, Class()->GetName(), whatever)
624 #define ToAliErrorClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, Class()->GetName(), whatever)
625 #define StdoutToAliErrorGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kError, 0, scope, whatever)
626 #define StderrToAliErrorGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kError, 0, scope, whatever)
627 #define ToAliErrorGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, scope, whatever)
629 // error stream objects
630 #define AliErrorStream() AliLog::Stream(AliLog::kError, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
631 #define AliErrorClassStream() AliLog::Stream(AliLog::kError, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
632 #define AliErrorGeneralStream(scope) AliLog::Stream(AliLog::kError, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
637 * Forwards to AliMessage with log level of AliLog::kFatal
640 #define AliFatal(message) AliMessage(AliLog::kFatal, message)
642 * Forwards to AliMessageClass with log level of AliLog::kFatal
643 * @see AliMessageClass
645 #define AliFatalClass(message) AliMessageClass(AliLog::kFatal, message)
647 * Forwards to AliMessageGeneral with log level of AliLog::kFatal
648 * @see AliMessageGeneral
650 #define AliFatalGeneral(scope, message) AliMessageGeneral(scope, AliLog::kFatal, message)
652 * Forwards to AliMessageF with log level of AliLog::kFatal
655 #define AliFatalF(message,...) AliMessageF(AliLog::kFatal, message, __VA_ARGS__)
657 * Forwards to AliMessageClassF with log level of AliLog::kFatal
658 * @see AliMessageClassF
660 #define AliFatalClassF(message,...) AliMessageClassF(AliLog::kFatal, message, __VA_ARGS__)
662 * Forwards to AliMessageGeneralF with log level of AliLog::kFatal
663 * @see AliMessageGeneralF
665 #define AliFatalGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kFatal, message, __VA_ARGS__)