3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
14 #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
15 # define ALIROOT_DEPRECATED(func) func __attribute__ ((deprecated))
16 #elif defined(_MSC_VER) && _MSC_VER >= 1300
17 # define ALIROOT_DEPRECATED(func) __declspec(deprecated) func
19 # define ALIROOT_DEPRECATED(func) func
23 * class for logging debug, info and error messages
25 class AliLog: public TObject
29 // Log4j log levels: TRACE, DEBUG, INFO, WARN, ERROR, FATAL
30 enum EType_t {kFatal = 0, kError, kWarning, kInfo, kDebug, kMaxType};
31 typedef void (*AliLogNotification)(EType_t type, const char* message );
33 // NB: singleton constructor & destructor should not be public!
34 // ALIROOT_DEPRECATED(AliLog());
35 // ALIROOT_DEPRECATED(virtual ~AliLog());
37 // NB: singleton deprecated static instance method
38 // ALIROOT_DEPRECATED(static AliLog* Instance() {return fgInstance;};)
40 // get root logger singleton instance
41 static AliLog *GetRootLogger();
43 // delete root logger singleton instance
44 static void DeleteRootLogger();
46 // NB: the following functions should not be static
47 // NB: deprecated: logging configuration should be made through to a configuration file
48 static void EnableDebug(Bool_t enabled);
49 static void SetGlobalLogLevel(EType_t type);
50 static Int_t GetGlobalLogLevel();
51 static void SetGlobalDebugLevel(Int_t level);
52 static Int_t GetGlobalDebugLevel();
53 static void SetModuleDebugLevel(const char* module, Int_t level);
54 static void ClearModuleDebugLevel(const char* module);
55 static void SetClassDebugLevel(const char* className, Int_t level);
56 static void ClearClassDebugLevel(const char* className);
58 static void SetStandardOutput();
59 static void SetStandardOutput(EType_t type);
60 static void SetErrorOutput();
61 static void SetErrorOutput(EType_t type);
62 static void SetFileOutput(const char* fileName);
63 static void SetFileOutput(EType_t type, const char* fileName);
64 static void SetStreamOutput(ostream* stream);
65 static void SetStreamOutput(EType_t type, ostream* stream);
66 static void SetLogNotification(AliLogNotification pCallBack);
67 static void SetLogNotification(EType_t type, AliLogNotification pCallBack);
70 static void SetHandleRootMessages(Bool_t on);
72 static void SetPrintType(Bool_t on);
73 static void SetPrintType(EType_t type, Bool_t on);
74 static void SetPrintModule(Bool_t on);
75 static void SetPrintModule(EType_t type, Bool_t on);
76 static void SetPrintScope(Bool_t on);
77 static void SetPrintScope(EType_t type, Bool_t on);
78 static void SetPrintLocation(Bool_t on);
79 static void SetPrintLocation(EType_t type, Bool_t on);
81 static void SetPrintRepetitions(Bool_t on);
83 static void WriteToFile(const char* name, Int_t option = 0);
85 // the following public methods are used by the preprocessor macros
86 // and should not be called directly
87 static Bool_t IsDebugEnabled() {return fgDebugEnabled;}
88 static Int_t GetDebugLevel(const char* module, const char* className);
89 static void Message(UInt_t level, const char* message,
90 const char* module, const char* className,
91 const char* function, const char* file, Int_t line);
92 static void Debug(UInt_t level, const char* message,
93 const char* module, const char* className,
94 const char* function, const char* file, Int_t line);
96 static Int_t RedirectStdoutTo(EType_t type, UInt_t level, const char* module,
97 const char* className, const char* function,
98 const char* file, Int_t line, Bool_t print);
99 static Int_t RedirectStderrTo(EType_t type, UInt_t level, const char* module,
100 const char* className, const char* function,
101 const char* file, Int_t line, Bool_t print);
102 static void RestoreStdout(Int_t original);
103 static void RestoreStderr(Int_t original);
105 static ostream& Stream(EType_t type, UInt_t level,
106 const char* module, const char* className,
107 const char* function, const char* file, Int_t line);
111 // constructor is made private for implementing a singleton
116 AliLog(const AliLog& log);
117 AliLog& operator = (const AliLog& log);
119 void ReadEnvSettings();
121 static void RootErrorHandler(Int_t level, Bool_t abort,
122 const char* location, const char* message);
124 void CloseFile(Int_t type);
125 FILE* GetOutputStream(Int_t type);
127 UInt_t GetLogLevel(const char* module, const char* className) const;
128 void PrintMessage(UInt_t type, const char* message,
129 const char* module, const char* className,
130 const char* function,
131 const char* file, Int_t line);
133 void PrintString(Int_t type, FILE* stream, const char* format, ...);
134 void PrintRepetitions();
136 Int_t RedirectTo(FILE* stream, EType_t type, UInt_t level,
137 const char* module, const char* className,
138 const char* function,
139 const char* file, Int_t line, Bool_t print);
141 ostream& GetStream(EType_t type, UInt_t level,
142 const char* module, const char* className,
143 const char* function, const char* file, Int_t line);
145 enum {kDebugOffset = kDebug-1};
147 static AliLog* fgInstance; //! pointer to current instance
148 static Bool_t fgDebugEnabled; // flag for debug en-/disabling
150 UInt_t fGlobalLogLevel; // global logging level
151 TObjArray fModuleDebugLevels; // debug levels for modules
152 TObjArray fClassDebugLevels; // debug levels for classes
154 Int_t fOutputTypes[kMaxType]; // types of output streams
155 TString fFileNames[kMaxType]; // file names
156 FILE* fOutputFiles[kMaxType]; //! log output files
157 ostream* fOutputStreams[kMaxType]; //! log output streams
159 Bool_t fPrintType[kMaxType]; // print type on/off
160 Bool_t fPrintModule[kMaxType]; // print module on/off
161 Bool_t fPrintScope[kMaxType]; // print scope/class name on/off
162 Bool_t fPrintLocation[kMaxType]; // print file and line on/off
164 Bool_t fPrintRepetitions; // print number of repetitions instead of repeated message on/off
166 Int_t fRepetitions; //! counter of repetitions
167 UInt_t fLastType; //! type of last message
168 TString fLastMessage; //! last message
169 TString fLastModule; //! module name of last message
170 TString fLastClassName; //! class name of last message
171 TString fLastFunction; //! function name of last message
172 TString fLastFile; //! file name of last message
173 Int_t fLastLine; //! line number of last message
174 AliLogNotification fCallBacks[kMaxType]; //! external notification callback
176 ClassDef(AliLog, 1) // class for logging debug, info and error messages
182 # define MODULENAME() _MODULE_
184 # define MODULENAME() "NoModule"
187 // function name macro
188 #if defined(__GNUC__) || defined(__ICC) || defined(__ECC) || defined(__APPLE__)
189 # define FUNCTIONNAME() __FUNCTION__
190 // #elif defined(__HP_aCC) || defined(__alpha) || defined(__DECCXX)
191 // #define FUNCTIONNAME() __FUNC__
193 # define FUNCTIONNAME() "???"
198 * Redirect output to std::cout to specified log stream
200 * @param type Type of stream to re-direct to
201 * @param level Level of output
203 * @param whatever Any code that will output to std::cout
205 #define REDIRECTSTDOUT(type, level, scope, whatever) \
206 do {Int_t originalStdout = AliLog::RedirectStdoutTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
207 whatever; AliLog::RestoreStdout(originalStdout);} while(false)
209 * Redirect output to std::cerr to specified log stream
211 * @param type Type of stream to re-direct to
212 * @param level Level of output
214 * @param whatever Any code that will output to std::cout
216 #define REDIRECTSTDERR(type, level, scope, whatever) \
217 do {Int_t originalStderr = AliLog::RedirectStderrTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
218 whatever; AliLog::RestoreStderr(originalStderr);} while(false)
220 * Redirect output to std::cout and std::cerr to specified log stream
222 * @param type Type of stream to re-direct to
223 * @param level Level of output
225 * @param whatever Any code that will output to std::cout or std::cerr
227 #define REDIRECTSTDOUTANDSTDERR(type, level, scope, whatever) \
228 do {Int_t originalStdout = AliLog::RedirectStdoutTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
229 Int_t originalStderr = AliLog::RedirectStderrTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
230 whatever; AliLog::RestoreStderr(originalStderr); AliLog::RestoreStdout(originalStdout);} while(false)
235 # define AliDebugLevel() -1
236 # define AliDebugLevelClass() -1
237 # define AliDebugLevelGeneral(scope) -1
240 * Get the object scope debug level
242 # define AliDebugLevel() ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), ClassName()) : -1)
244 * Get the class (ROOT-enabled) debug level
246 # define AliDebugLevelClass() ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) : -1)
248 * Get the debug level associated with scope
251 # define AliDebugLevelGeneral(scope) ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), scope) : -1)
256 # define AliDebug(level, message) do { } while (false)
257 # define AliDebugClass(level, message) do { } while (false)
258 # define AliDebugGeneral(scope, level, message) do { } while (false)
259 # define AliDebugF(level, message,...) do { } while (false)
260 # define AliDebugClassF(level, message,...) do { } while (false)
261 # define AliDebugGeneralF(scope, level, message,...) do { } while (false)
264 // inspired by log4cxx code (see log4cxx/Logger.h)
265 // implements GCC branch prediction for increasing logging performance
266 # if !defined(ALIROOT_UNLIKELY)
267 # if defined(__GNUC__) && (__GNUC__ >= 3)
269 * Provides optimization hint to the compiler
270 * to optimize for the expression being false.
271 * @param expr boolean expression.
272 * @returns value of expression.
274 # define ALIROOT_UNLIKELY(expr) __builtin_expect(expr, 0)
277 * Provides optimization hint to the compiler
278 * to optimize for the expression being false.
279 * @param expr boolean expression.
280 * @returns value of expression.
282 # define ALIROOT_UNLIKELY(expr) expr
288 * Logs a message to a specified logger with the DEBUG level.
290 * @param logLevel the debug level.
291 * @param message message to print in the following format: Form(message).
292 * Note, that message should contain balanced parenthesis, like
293 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
295 # define AliDebug(logLevel, message) \
296 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), ClassName()) >= logLevel)) {\
297 AliLog::Debug(logLevel, message, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
300 * Logs a message to a specified logger with the DEBUG level. For use
301 * in static member functions of a class
303 * @param logLevel the debug level.
304 * @param message message to print in the following format: Form(message).
305 * Note, that message should contain balanced parenthesis, like
306 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
308 # define AliDebugClass(logLevel, message) \
309 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) >= logLevel)) {\
310 AliLog::Debug(logLevel, message, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
313 * Logs a message to a specified logger with the DEBUG level. For use
314 * in non-ROOT-enabled-class scope.
316 * @param scope the logging scope.
317 * @param logLevel the debug level.
318 * @param message message to print in the following format: Form(message).
319 * Note, that message should contain balanced parenthesis, like
320 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
322 # define AliDebugGeneral(scope, logLevel, message) \
323 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), scope) >= logLevel)) {\
324 AliLog::Debug(logLevel, message, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
326 * Macro to output debugging information. This excepts a printf-like
327 * format statement. Note, at least 3 arguments (in total) must be
330 * @param logLevel Debug level
331 * @param format Printf-like format.
333 # define AliDebugF(logLevel,format,...) \
334 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), ClassName()) >= logLevel)) { \
335 TString m;m.Form(format,__VA_ARGS__); \
336 AliLog::Debug(logLevel, m, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
338 * Outut debug information, filtered on debug level. For use in
339 * static member function of a ROOT-enabled class. This excepts a
340 * printf-like format statement. Note, at least 3 arguments (in
341 * total) must be passed.
343 * @param logLevel Debug level
344 * @param format Printf-like format
348 # define AliDebugClassF(logLevel,format,...) \
349 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) >= logLevel)) { \
350 TString m;m.Form(format,__VA_ARGS__); \
351 AliLog::Debug(logLevel, m, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
353 * Outut debug information, filtered on debug level. For use in
354 * static member function of a non-ROOT-enabled class-scope. This
355 * excepts a printf-like format statement. Note, at least 3 arguments
356 * (in total) must be passed.
359 * @param logLevel Debug level
360 * @param format Printf-like format
364 # define AliDebugGeneralF(scope,logLevel,format,...) \
365 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), scope) >= logLevel)) { \
366 TString m;m.Form(format,__VA_ARGS__); \
367 AliLog::Debug(logLevel, m, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
371 // redirection to debug
372 #define StdoutToAliDebug(level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, ClassName(), whatever)
373 #define StderrToAliDebug(level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, ClassName(), whatever)
374 #define ToAliDebug(level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, ClassName(), whatever)
375 #define StdoutToAliDebugClass(level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, Class()->GetName(), whatever)
376 #define StderrToAliDebugClass(level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, Class()->GetName(), whatever)
377 #define ToAliDebugClass(level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, Class()->GetName(), whatever)
378 #define StdoutToAliDebugGeneral(scope, level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, scope, whatever)
379 #define StderrToAliDebugGeneral(scope, level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, scope, whatever)
380 #define ToAliDebugGeneral(scope, level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, scope, whatever)
382 // debug stream objects
383 #define AliDebugStream(level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
384 #define AliDebugClassStream(level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
385 #define AliDebugGeneralStream(scope, level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
389 * Macro that will output stuff using the logging facilities.
391 * @param lvl Message level
392 * @param message Message to show
394 #define AliMessage(lvl,message) do { \
395 AliLog::Message(lvl, message, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
397 * Macro that will output stuff using the logging facilities.
398 * For use in static member function of ROOT-enabled class-scope.
400 * @param lvl Message level
401 * @param message Message to show
403 #define AliMessageClass(lvl,message) do { \
404 AliLog::Message(lvl, message, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
406 * Macro that will output stuff using the logging facilities.
407 * For use in non-ROOT-enabled class-scope.
410 * @param lvl Message level
411 * @param message Message to show
413 #define AliMessageGeneral(scope,lvl,message) do { \
414 AliLog::Message(lvl, message, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
416 * Print a message using the AliLog logging facility. This macro
417 * accepts printf-like format arguments. Note, at least 3 arguments
420 * AliMessageF(1, "foo"); // <-- Failes
421 * AliMessageF(1, "foo %d", 42); // <-- OK
424 * @param lvl Message level
425 * @param format printf-like format
427 #define AliMessageF(lvl,format,...) do { \
428 TString m; m.Form(format,__VA_ARGS__); \
429 AliLog::Message(lvl, m, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
431 * Print a message using the AliLog logging facility. This macro
432 * accepts printf-like format arguments. Note, at least 3 arguments
435 * AliMessageF(1, "foo"); // <-- Failes
436 * AliMessageF(1, "foo %d", 42); // <-- OK
439 * This is for static member function in for ROOT-enabled class-scope
441 * @param lvl Message level
442 * @param format printf-like format
444 #define AliMessageClassF(lvl,format,...) do { \
445 TString m; m.Form(format,__VA_ARGS__); \
446 AliLog::Message(lvl, m, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
448 * Print a message using the AliLog logging facility. This macro
449 * accepts printf-like format arguments. Note, at least 3 arguments
452 * AliMessageF(1, "foo"); // <-- Failes
453 * AliMessageF(1, "foo %d", 42); // <-- OK
456 * This is for non-ROOT-enabled class-scope
459 * @param lvl Message level
460 * @param format printf-like format
462 #define AliMessageGeneralF(scope,lvl,format,...) do { \
463 TString m; m.Form(format,__VA_ARGS__); \
464 AliLog::Message(lvl, m, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
468 # define AliInfo(message) do { } while (false)
469 # define AliInfoClass(message) do { } while (false)
470 # define AliInfoGeneral(scope, message) do { } while (false)
471 # define AliInfoF(message,...) do { } while (false)
472 # define AliInfoClassF(message,...) do { } while (false)
473 # define AliInfoGeneralF(scope, message,...) do { } while (false)
476 * Forwards to AliMessage with log level of AliLog::kInfo
479 # define AliInfo(message) AliMessage(AliLog::kInfo, message)
481 * Forwards to AliMessageClass with log level of AliLog::kInfo
482 * @see AliMessageClass
484 # define AliInfoClass(message) AliMessageClass(AliLog::kInfo, message)
486 * Forwards to AliMessageGeneral with log level of AliLog::kInfo
487 * @see AliMessageGeneral
489 # define AliInfoGeneral(scope, message) AliMessageGeneral(scope, AliLog::kInfo, message)
491 * Forwards to AliMessageF with log level of AliLog::kInfo
494 # define AliInfoF(message,...) AliMessageF(AliLog::kInfo, message, __VA_ARGS__)
496 * Forwards to AliMessageClassF with log level of AliLog::kInfo
497 * @see AliMessageClassF
499 # define AliInfoClassF(message,...) AliMessageClassF(AliLog::kInfo, message, __VA_ARGS__)
501 * Forwards to AliMessageGeneralF with log level of AliLog::kInfo
502 * @see AliMessageGeneralF
504 # define AliInfoGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kInfo, message, __VA_ARGS__)
507 // redirection to info
508 #define StdoutToAliInfo(whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, ClassName(), whatever)
509 #define StderrToAliInfo(whatever) REDIRECTSTDERR(AliLog::kInfo, 0, ClassName(), whatever)
510 #define ToAliInfo(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, ClassName(), whatever)
511 #define StdoutToAliInfoClass(whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, Class()->GetName(), whatever)
512 #define StderrToAliInfoClass(whatever) REDIRECTSTDERR(AliLog::kInfo, 0, Class()->GetName(), whatever)
513 #define ToAliInfoClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, Class()->GetName(), whatever)
514 #define StdoutToAliInfoGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, scope, whatever)
515 #define StderrToAliInfoGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kInfo, 0, scope, whatever)
516 #define ToAliInfoGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, scope, whatever)
518 // info stream objects
519 #define AliInfoStream() AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
520 #define AliInfoClassStream() AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
521 #define AliInfoGeneralStream(scope) AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
524 #ifdef LOG_NO_WARNING
525 # define AliWarning(message) do { } while (false)
526 # define AliWarningClass(message) do { } while (false)
527 # define AliWarningGeneral(scope, message) do { } while (false)
528 # define AliWarningF(message,...) do { } while (false)
529 # define AliWarningClassF(message,...) do { } while (false)
530 # define AliWarningGeneralF(scope, message,...) do { } while (false)
533 * Forwards to AliMessage with log level of AliLog::kWarning
536 # define AliWarning(message) AliMessage(AliLog::kWarning, message)
538 * Forwards to AliMessageClass with log level of AliLog::kWarning
539 * @see AliMessageClass
541 # define AliWarningClass(message) AliMessageClass(AliLog::kWarning, message)
543 * Forwards to AliMessageGeneral with log level of AliLog::kWarning
544 * @see AliMessageGeneral
546 # define AliWarningGeneral(scope, message) AliMessageGeneral(scope, AliLog::kWarning, message)
548 * Forwards to AliMessageF with log level of AliLog::kWarning
551 # define AliWarningF(message,...) AliMessageF(AliLog::kWarning, message, __VA_ARGS__)
553 * Forwards to AliMessageClassF with log level of AliLog::kWarning
554 * @see AliMessageClassF
556 # define AliWarningClassF(message,...) AliMessageClassF(AliLog::kWarning, message, __VA_ARGS__)
558 * Forwards to AliMessageGeneralF with log level of AliLog::kWarning
559 * @see AliMessageGeneralF
561 # define AliWarningGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kWarning, message, __VA_ARGS__)
564 // redirection to warning
565 #define StdoutToAliWarning(whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, ClassName(), whatever)
566 #define StderrToAliWarning(whatever) REDIRECTSTDERR(AliLog::kWarning, 0, ClassName(), whatever)
567 #define ToAliWarning(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, ClassName(), whatever)
568 #define StdoutToAliWarningClass(whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, Class()->GetName(), whatever)
569 #define StderrToAliWarningClass(whatever) REDIRECTSTDERR(AliLog::kWarning, 0, Class()->GetName(), whatever)
570 #define ToAliWarningClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, Class()->GetName(), whatever)
571 #define StdoutToAliWarningGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, scope, whatever)
572 #define StderrToAliWarningGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kWarning, 0, scope, whatever)
573 #define ToAliWarningGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, scope, whatever)
575 // warning stream objects
576 #define AliWarningStream() AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
577 #define AliWarningClassStream() AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
578 #define AliWarningGeneralStream(scope) AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
583 * Forwards to AliMessage with log level of AliLog::kError
586 #define AliError(message) AliMessage(AliLog::kError, message)
588 * Forwards to AliMessageClass with log level of AliLog::kError
589 * @see AliMessageClass
591 #define AliErrorClass(message) AliMessageClass(AliLog::kError, message)
593 * Forwards to AliMessageGeneral with log level of AliLog::kError
594 * @see AliMessageGeneral
596 #define AliErrorGeneral(scope, message) AliMessageGeneral(scope, AliLog::kError, message)
598 * Forwards to AliMessageF with log level of AliLog::kError
601 #define AliErrorF(message,...) AliMessageF(AliLog::kError, message, __VA_ARGS__)
603 * Forwards to AliMessageClassF with log level of AliLog::kError
604 * @see AliMessageClassF
606 #define AliErrorClassF(message,...) AliMessageClassF(AliLog::kError, message, __VA_ARGS__)
608 * Forwards to AliMessageGeneralF with log level of AliLog::kError
609 * @see AliMessageGeneralF
611 #define AliErrorGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kError, message, __VA_ARGS__)
613 // redirection to error
614 #define StdoutToAliError(whatever) REDIRECTSTDOUT(AliLog::kError, 0, ClassName(), whatever)
615 #define StderrToAliError(whatever) REDIRECTSTDERR(AliLog::kError, 0, ClassName(), whatever)
616 #define ToAliError(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, ClassName(), whatever)
617 #define StdoutToAliErrorClass(whatever) REDIRECTSTDOUT(AliLog::kError, 0, Class()->GetName(), whatever)
618 #define StderrToAliErrorClass(whatever) REDIRECTSTDERR(AliLog::kError, 0, Class()->GetName(), whatever)
619 #define ToAliErrorClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, Class()->GetName(), whatever)
620 #define StdoutToAliErrorGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kError, 0, scope, whatever)
621 #define StderrToAliErrorGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kError, 0, scope, whatever)
622 #define ToAliErrorGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, scope, whatever)
624 // error stream objects
625 #define AliErrorStream() AliLog::Stream(AliLog::kError, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
626 #define AliErrorClassStream() AliLog::Stream(AliLog::kError, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
627 #define AliErrorGeneralStream(scope) AliLog::Stream(AliLog::kError, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
632 * Forwards to AliMessage with log level of AliLog::kFatal
635 #define AliFatal(message) AliMessage(AliLog::kFatal, message)
637 * Forwards to AliMessageClass with log level of AliLog::kFatal
638 * @see AliMessageClass
640 #define AliFatalClass(message) AliMessageClass(AliLog::kFatal, message)
642 * Forwards to AliMessageGeneral with log level of AliLog::kFatal
643 * @see AliMessageGeneral
645 #define AliFatalGeneral(scope, message) AliMessageGeneral(scope, AliLog::kFatal, message)
647 * Forwards to AliMessageF with log level of AliLog::kFatal
650 #define AliFatalF(message,...) AliMessageF(AliLog::kFatal, message, __VA_ARGS__)
652 * Forwards to AliMessageClassF with log level of AliLog::kFatal
653 * @see AliMessageClassF
655 #define AliFatalClassF(message,...) AliMessageClassF(AliLog::kFatal, message, __VA_ARGS__)
657 * Forwards to AliMessageGeneralF with log level of AliLog::kFatal
658 * @see AliMessageGeneralF
660 #define AliFatalGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kFatal, message, __VA_ARGS__)