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 EnableDebug(Bool_t enabled);
51 static void SetGlobalLogLevel(EType_t type);
52 static Int_t GetGlobalLogLevel();
53 static void SetGlobalDebugLevel(Int_t level);
54 static Int_t GetGlobalDebugLevel();
55 static void SetModuleDebugLevel(const char* module, Int_t level);
56 static void ClearModuleDebugLevel(const char* module);
57 static void SetClassDebugLevel(const char* className, Int_t level);
58 static void ClearClassDebugLevel(const char* className);
60 static void SetStandardOutput();
61 static void SetStandardOutput(EType_t type);
62 static void SetErrorOutput();
63 static void SetErrorOutput(EType_t type);
64 static void SetFileOutput(const char* fileName);
65 static void SetFileOutput(EType_t type, const char* fileName);
66 static void SetStreamOutput(ostream* stream);
67 static void SetStreamOutput(EType_t type, ostream* stream);
68 static void SetLogNotification(AliLogNotification pCallBack);
69 static void SetLogNotification(EType_t type, AliLogNotification pCallBack);
72 static void SetHandleRootMessages(Bool_t on);
74 static void SetPrintType(Bool_t on);
75 static void SetPrintType(EType_t type, Bool_t on);
76 static void SetPrintModule(Bool_t on);
77 static void SetPrintModule(EType_t type, Bool_t on);
78 static void SetPrintScope(Bool_t on);
79 static void SetPrintScope(EType_t type, Bool_t on);
80 static void SetPrintLocation(Bool_t on);
81 static void SetPrintLocation(EType_t type, Bool_t on);
83 static void SetPrintRepetitions(Bool_t on);
85 static void WriteToFile(const char* name, Int_t option = 0);
87 // the following public methods are used by the preprocessor macros
88 // and should not be called directly
89 static Bool_t IsDebugEnabled() {return fgDebugEnabled;}
90 static Int_t GetDebugLevel(const char* module, const char* className);
91 static void Message(UInt_t level, const char* message,
92 const char* module, const char* className,
93 const char* function, const char* file, Int_t line);
94 static void Debug(UInt_t level, const char* message,
95 const char* module, const char* className,
96 const char* function, const char* file, Int_t line);
98 static Int_t RedirectStdoutTo(EType_t type, UInt_t level, const char* module,
99 const char* className, const char* function,
100 const char* file, Int_t line, Bool_t print);
101 static Int_t RedirectStderrTo(EType_t type, UInt_t level, const char* module,
102 const char* className, const char* function,
103 const char* file, Int_t line, Bool_t print);
104 static void RestoreStdout(Int_t original);
105 static void RestoreStderr(Int_t original);
107 static ostream& Stream(EType_t type, UInt_t level,
108 const char* module, const char* className,
109 const char* function, const char* file, Int_t line);
113 // constructor is made private for implementing a singleton
118 AliLog(const AliLog& log);
119 AliLog& operator = (const AliLog& log);
121 void ReadEnvSettings();
123 static void RootErrorHandler(Int_t level, Bool_t abort,
124 const char* location, const char* message);
126 void CloseFile(Int_t type);
127 FILE* GetOutputStream(Int_t type);
129 UInt_t GetLogLevel(const char* module, const char* className) const;
130 void PrintMessage(UInt_t type, const char* message,
131 const char* module, const char* className,
132 const char* function,
133 const char* file, Int_t line);
135 void PrintString(Int_t type, FILE* stream, const char* format, ...);
136 void PrintRepetitions();
138 Int_t RedirectTo(FILE* stream, EType_t type, UInt_t level,
139 const char* module, const char* className,
140 const char* function,
141 const char* file, Int_t line, Bool_t print);
143 ostream& GetStream(EType_t type, UInt_t level,
144 const char* module, const char* className,
145 const char* function, const char* file, Int_t line);
147 enum {kDebugOffset = kDebug-1};
149 static AliLog* fgInstance; //! pointer to current instance
150 static Bool_t fgDebugEnabled; // flag for debug en-/disabling
152 UInt_t fGlobalLogLevel; // global logging level
153 TObjArray fModuleDebugLevels; // debug levels for modules
154 TObjArray fClassDebugLevels; // debug levels for classes
156 Int_t fOutputTypes[kMaxType]; // types of output streams
157 TString fFileNames[kMaxType]; // file names
158 FILE* fOutputFiles[kMaxType]; //! log output files
159 ostream* fOutputStreams[kMaxType]; //! log output streams
161 Bool_t fPrintType[kMaxType]; // print type on/off
162 Bool_t fPrintModule[kMaxType]; // print module on/off
163 Bool_t fPrintScope[kMaxType]; // print scope/class name on/off
164 Bool_t fPrintLocation[kMaxType]; // print file and line on/off
166 Bool_t fPrintRepetitions; // print number of repetitions instead of repeated message on/off
168 Int_t fRepetitions; //! counter of repetitions
169 UInt_t fLastType; //! type of last message
170 TString fLastMessage; //! last message
171 TString fLastModule; //! module name of last message
172 TString fLastClassName; //! class name of last message
173 TString fLastFunction; //! function name of last message
174 TString fLastFile; //! file name of last message
175 Int_t fLastLine; //! line number of last message
176 AliLogNotification fCallBacks[kMaxType]; //! external notification callback
178 ClassDef(AliLog, 1) // class for logging debug, info and error messages
184 # define MODULENAME() _MODULE_
186 # define MODULENAME() "NoModule"
189 // function name macro
190 #if defined(__GNUC__) || defined(__ICC) || defined(__ECC) || defined(__APPLE__)
191 # define FUNCTIONNAME() __FUNCTION__
192 // #elif defined(__HP_aCC) || defined(__alpha) || defined(__DECCXX)
193 // #define FUNCTIONNAME() __FUNC__
195 # define FUNCTIONNAME() "???"
200 * Redirect output to std::cout to specified log stream
202 * @param type Type of stream to re-direct to
203 * @param level Level of output
205 * @param whatever Any code that will output to std::cout
207 #define REDIRECTSTDOUT(type, level, scope, whatever) \
208 do {Int_t originalStdout = AliLog::RedirectStdoutTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
209 whatever; AliLog::RestoreStdout(originalStdout);} while(false)
211 * Redirect output to std::cerr to specified log stream
213 * @param type Type of stream to re-direct to
214 * @param level Level of output
216 * @param whatever Any code that will output to std::cout
218 #define REDIRECTSTDERR(type, level, scope, whatever) \
219 do {Int_t originalStderr = AliLog::RedirectStderrTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
220 whatever; AliLog::RestoreStderr(originalStderr);} while(false)
222 * Redirect output to std::cout and std::cerr to specified log stream
224 * @param type Type of stream to re-direct to
225 * @param level Level of output
227 * @param whatever Any code that will output to std::cout or std::cerr
229 #define REDIRECTSTDOUTANDSTDERR(type, level, scope, whatever) \
230 do {Int_t originalStdout = AliLog::RedirectStdoutTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
231 Int_t originalStderr = AliLog::RedirectStderrTo(type, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__, kFALSE); \
232 whatever; AliLog::RestoreStderr(originalStderr); AliLog::RestoreStdout(originalStdout);} while(false)
237 # define AliDebugLevel() -1
238 # define AliDebugLevelClass() -1
239 # define AliDebugLevelGeneral(scope) -1
242 * Get the object scope debug level
244 # define AliDebugLevel() ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), ClassName()) : -1)
246 * Get the class (ROOT-enabled) debug level
248 # define AliDebugLevelClass() ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) : -1)
250 * Get the debug level associated with scope
253 # define AliDebugLevelGeneral(scope) ((AliLog::IsDebugEnabled()) ? AliLog::GetDebugLevel(MODULENAME(), scope) : -1)
258 # define AliDebug(level, message) do { } while (false)
259 # define AliDebugClass(level, message) do { } while (false)
260 # define AliDebugGeneral(scope, level, message) do { } while (false)
261 # define AliDebugF(level, message,...) do { } while (false)
262 # define AliDebugClassF(level, message,...) do { } while (false)
263 # define AliDebugGeneralF(scope, level, message,...) do { } while (false)
266 // inspired by log4cxx code (see log4cxx/Logger.h)
267 // implements GCC branch prediction for increasing logging performance
268 # if !defined(ALIROOT_UNLIKELY)
269 # if defined(__GNUC__) && (__GNUC__ >= 3)
271 * Provides optimization hint to the compiler
272 * to optimize for the expression being false.
273 * @param expr boolean expression.
274 * @returns value of expression.
276 # define ALIROOT_UNLIKELY(expr) __builtin_expect(expr, 0)
279 * Provides optimization hint to the compiler
280 * to optimize for the expression being false.
281 * @param expr boolean expression.
282 * @returns value of expression.
284 # define ALIROOT_UNLIKELY(expr) expr
290 * Logs a message to a specified logger with the DEBUG level.
292 * @param logLevel the debug level.
293 * @param message message to print in the following format: Form(message).
294 * Note, that message should contain balanced parenthesis, like
295 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
297 # define AliDebug(logLevel, message) \
298 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), ClassName()) >= logLevel)) {\
299 AliLog::Debug(logLevel, message, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
302 * Logs a message to a specified logger with the DEBUG level. For use
303 * in static member functions of a class
305 * @param logLevel the debug level.
306 * @param message message to print in the following format: Form(message).
307 * Note, that message should contain balanced parenthesis, like
308 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
310 # define AliDebugClass(logLevel, message) \
311 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) >= logLevel)) {\
312 AliLog::Debug(logLevel, message, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
315 * Logs a message to a specified logger with the DEBUG level. For use
316 * in non-ROOT-enabled-class scope.
318 * @param scope the logging scope.
319 * @param logLevel the debug level.
320 * @param message message to print in the following format: Form(message).
321 * Note, that message should contain balanced parenthesis, like
322 * <code>AliDebug(1, Form("Failed to decode line %d of %s", line, filename));</code>
324 # define AliDebugGeneral(scope, logLevel, message) \
325 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), scope) >= logLevel)) {\
326 AliLog::Debug(logLevel, message, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
328 * Macro to output debugging information. This excepts a printf-like
329 * format statement. Note, at least 3 arguments (in total) must be
332 * @param logLevel Debug level
333 * @param format Printf-like format.
335 # define AliDebugF(logLevel,format,...) \
336 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), ClassName()) >= logLevel)) { \
337 TString m;m.Form(format,__VA_ARGS__); \
338 AliLog::Debug(logLevel, m, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
340 * Outut debug information, filtered on debug level. For use in
341 * static member function of a ROOT-enabled class. This excepts a
342 * printf-like format statement. Note, at least 3 arguments (in
343 * total) must be passed.
345 * @param logLevel Debug level
346 * @param format Printf-like format
350 # define AliDebugClassF(logLevel,format,...) \
351 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), Class()->GetName()) >= logLevel)) { \
352 TString m;m.Form(format,__VA_ARGS__); \
353 AliLog::Debug(logLevel, m, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
355 * Outut debug information, filtered on debug level. For use in
356 * static member function of a non-ROOT-enabled class-scope. This
357 * excepts a printf-like format statement. Note, at least 3 arguments
358 * (in total) must be passed.
361 * @param logLevel Debug level
362 * @param format Printf-like format
366 # define AliDebugGeneralF(scope,logLevel,format,...) \
367 do { if (ALIROOT_UNLIKELY(AliLog::IsDebugEnabled() && AliLog::GetDebugLevel(MODULENAME(), scope) >= logLevel)) { \
368 TString m;m.Form(format,__VA_ARGS__); \
369 AliLog::Debug(logLevel, m, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__); }} while (0)
373 // redirection to debug
374 #define StdoutToAliDebug(level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, ClassName(), whatever)
375 #define StderrToAliDebug(level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, ClassName(), whatever)
376 #define ToAliDebug(level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, ClassName(), whatever)
377 #define StdoutToAliDebugClass(level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, Class()->GetName(), whatever)
378 #define StderrToAliDebugClass(level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, Class()->GetName(), whatever)
379 #define ToAliDebugClass(level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, Class()->GetName(), whatever)
380 #define StdoutToAliDebugGeneral(scope, level, whatever) REDIRECTSTDOUT(AliLog::kDebug, level, scope, whatever)
381 #define StderrToAliDebugGeneral(scope, level, whatever) REDIRECTSTDERR(AliLog::kDebug, level, scope, whatever)
382 #define ToAliDebugGeneral(scope, level, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kDebug, level, scope, whatever)
384 // debug stream objects
385 #define AliDebugStream(level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
386 #define AliDebugClassStream(level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
387 #define AliDebugGeneralStream(scope, level) AliLog::Stream(AliLog::kDebug, level, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
391 * Macro that will output stuff using the logging facilities.
393 * @param lvl Message level
394 * @param message Message to show
396 #define AliMessage(lvl,message) do { \
397 AliLog::Message(lvl, message, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
399 * Macro that will output stuff using the logging facilities.
400 * For use in static member function of ROOT-enabled class-scope.
402 * @param lvl Message level
403 * @param message Message to show
405 #define AliMessageClass(lvl,message) do { \
406 AliLog::Message(lvl, message, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
408 * Macro that will output stuff using the logging facilities.
409 * For use in non-ROOT-enabled class-scope.
412 * @param lvl Message level
413 * @param message Message to show
415 #define AliMessageGeneral(scope,lvl,message) do { \
416 AliLog::Message(lvl, message, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
418 * Print a message using the AliLog logging facility. This macro
419 * accepts printf-like format arguments. Note, at least 3 arguments
422 * AliMessageF(1, "foo"); // <-- Failes
423 * AliMessageF(1, "foo %d", 42); // <-- OK
426 * @param lvl Message level
427 * @param format printf-like format
429 #define AliMessageF(lvl,format,...) do { \
430 TString m; m.Form(format,__VA_ARGS__); \
431 AliLog::Message(lvl, m, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
433 * Print a message using the AliLog logging facility. This macro
434 * accepts printf-like format arguments. Note, at least 3 arguments
437 * AliMessageF(1, "foo"); // <-- Failes
438 * AliMessageF(1, "foo %d", 42); // <-- OK
441 * This is for static member function in for ROOT-enabled class-scope
443 * @param lvl Message level
444 * @param format printf-like format
446 #define AliMessageClassF(lvl,format,...) do { \
447 TString m; m.Form(format,__VA_ARGS__); \
448 AliLog::Message(lvl, m, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
450 * Print a message using the AliLog logging facility. This macro
451 * accepts printf-like format arguments. Note, at least 3 arguments
454 * AliMessageF(1, "foo"); // <-- Failes
455 * AliMessageF(1, "foo %d", 42); // <-- OK
458 * This is for non-ROOT-enabled class-scope
461 * @param lvl Message level
462 * @param format printf-like format
464 #define AliMessageGeneralF(scope,lvl,format,...) do { \
465 TString m; m.Form(format,__VA_ARGS__); \
466 AliLog::Message(lvl, m, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__);} while(false)
470 # define AliInfo(message) do { } while (false)
471 # define AliInfoClass(message) do { } while (false)
472 # define AliInfoGeneral(scope, message) do { } while (false)
473 # define AliInfoF(message,...) do { } while (false)
474 # define AliInfoClassF(message,...) do { } while (false)
475 # define AliInfoGeneralF(scope, message,...) do { } while (false)
478 * Forwards to AliMessage with log level of AliLog::kInfo
481 # define AliInfo(message) AliMessage(AliLog::kInfo, message)
483 * Forwards to AliMessageClass with log level of AliLog::kInfo
484 * @see AliMessageClass
486 # define AliInfoClass(message) AliMessageClass(AliLog::kInfo, message)
488 * Forwards to AliMessageGeneral with log level of AliLog::kInfo
489 * @see AliMessageGeneral
491 # define AliInfoGeneral(scope, message) AliMessageGeneral(scope, AliLog::kInfo, message)
493 * Forwards to AliMessageF with log level of AliLog::kInfo
496 # define AliInfoF(message,...) AliMessageF(AliLog::kInfo, message, __VA_ARGS__)
498 * Forwards to AliMessageClassF with log level of AliLog::kInfo
499 * @see AliMessageClassF
501 # define AliInfoClassF(message,...) AliMessageClassF(AliLog::kInfo, message, __VA_ARGS__)
503 * Forwards to AliMessageGeneralF with log level of AliLog::kInfo
504 * @see AliMessageGeneralF
506 # define AliInfoGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kInfo, message, __VA_ARGS__)
509 // redirection to info
510 #define StdoutToAliInfo(whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, ClassName(), whatever)
511 #define StderrToAliInfo(whatever) REDIRECTSTDERR(AliLog::kInfo, 0, ClassName(), whatever)
512 #define ToAliInfo(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, ClassName(), whatever)
513 #define StdoutToAliInfoClass(whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, Class()->GetName(), whatever)
514 #define StderrToAliInfoClass(whatever) REDIRECTSTDERR(AliLog::kInfo, 0, Class()->GetName(), whatever)
515 #define ToAliInfoClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, Class()->GetName(), whatever)
516 #define StdoutToAliInfoGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kInfo, 0, scope, whatever)
517 #define StderrToAliInfoGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kInfo, 0, scope, whatever)
518 #define ToAliInfoGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kInfo, 0, scope, whatever)
520 // info stream objects
521 #define AliInfoStream() AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
522 #define AliInfoClassStream() AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
523 #define AliInfoGeneralStream(scope) AliLog::Stream(AliLog::kInfo, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
526 #ifdef LOG_NO_WARNING
527 # define AliWarning(message) do { } while (false)
528 # define AliWarningClass(message) do { } while (false)
529 # define AliWarningGeneral(scope, message) do { } while (false)
530 # define AliWarningF(message,...) do { } while (false)
531 # define AliWarningClassF(message,...) do { } while (false)
532 # define AliWarningGeneralF(scope, message,...) do { } while (false)
535 * Forwards to AliMessage with log level of AliLog::kWarning
538 # define AliWarning(message) AliMessage(AliLog::kWarning, message)
540 * Forwards to AliMessageClass with log level of AliLog::kWarning
541 * @see AliMessageClass
543 # define AliWarningClass(message) AliMessageClass(AliLog::kWarning, message)
545 * Forwards to AliMessageGeneral with log level of AliLog::kWarning
546 * @see AliMessageGeneral
548 # define AliWarningGeneral(scope, message) AliMessageGeneral(scope, AliLog::kWarning, message)
550 * Forwards to AliMessageF with log level of AliLog::kWarning
553 # define AliWarningF(message,...) AliMessageF(AliLog::kWarning, message, __VA_ARGS__)
555 * Forwards to AliMessageClassF with log level of AliLog::kWarning
556 * @see AliMessageClassF
558 # define AliWarningClassF(message,...) AliMessageClassF(AliLog::kWarning, message, __VA_ARGS__)
560 * Forwards to AliMessageGeneralF with log level of AliLog::kWarning
561 * @see AliMessageGeneralF
563 # define AliWarningGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kWarning, message, __VA_ARGS__)
566 // redirection to warning
567 #define StdoutToAliWarning(whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, ClassName(), whatever)
568 #define StderrToAliWarning(whatever) REDIRECTSTDERR(AliLog::kWarning, 0, ClassName(), whatever)
569 #define ToAliWarning(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, ClassName(), whatever)
570 #define StdoutToAliWarningClass(whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, Class()->GetName(), whatever)
571 #define StderrToAliWarningClass(whatever) REDIRECTSTDERR(AliLog::kWarning, 0, Class()->GetName(), whatever)
572 #define ToAliWarningClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, Class()->GetName(), whatever)
573 #define StdoutToAliWarningGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kWarning, 0, scope, whatever)
574 #define StderrToAliWarningGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kWarning, 0, scope, whatever)
575 #define ToAliWarningGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kWarning, 0, scope, whatever)
577 // warning stream objects
578 #define AliWarningStream() AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
579 #define AliWarningClassStream() AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
580 #define AliWarningGeneralStream(scope) AliLog::Stream(AliLog::kWarning, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
585 * Forwards to AliMessage with log level of AliLog::kError
588 #define AliError(message) AliMessage(AliLog::kError, message)
590 * Forwards to AliMessageClass with log level of AliLog::kError
591 * @see AliMessageClass
593 #define AliErrorClass(message) AliMessageClass(AliLog::kError, message)
595 * Forwards to AliMessageGeneral with log level of AliLog::kError
596 * @see AliMessageGeneral
598 #define AliErrorGeneral(scope, message) AliMessageGeneral(scope, AliLog::kError, message)
600 * Forwards to AliMessageF with log level of AliLog::kError
603 #define AliErrorF(message,...) AliMessageF(AliLog::kError, message, __VA_ARGS__)
605 * Forwards to AliMessageClassF with log level of AliLog::kError
606 * @see AliMessageClassF
608 #define AliErrorClassF(message,...) AliMessageClassF(AliLog::kError, message, __VA_ARGS__)
610 * Forwards to AliMessageGeneralF with log level of AliLog::kError
611 * @see AliMessageGeneralF
613 #define AliErrorGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kError, message, __VA_ARGS__)
615 // redirection to error
616 #define StdoutToAliError(whatever) REDIRECTSTDOUT(AliLog::kError, 0, ClassName(), whatever)
617 #define StderrToAliError(whatever) REDIRECTSTDERR(AliLog::kError, 0, ClassName(), whatever)
618 #define ToAliError(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, ClassName(), whatever)
619 #define StdoutToAliErrorClass(whatever) REDIRECTSTDOUT(AliLog::kError, 0, Class()->GetName(), whatever)
620 #define StderrToAliErrorClass(whatever) REDIRECTSTDERR(AliLog::kError, 0, Class()->GetName(), whatever)
621 #define ToAliErrorClass(whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, Class()->GetName(), whatever)
622 #define StdoutToAliErrorGeneral(scope, whatever) REDIRECTSTDOUT(AliLog::kError, 0, scope, whatever)
623 #define StderrToAliErrorGeneral(scope, whatever) REDIRECTSTDERR(AliLog::kError, 0, scope, whatever)
624 #define ToAliErrorGeneral(scope, whatever) REDIRECTSTDOUTANDSTDERR(AliLog::kError, 0, scope, whatever)
626 // error stream objects
627 #define AliErrorStream() AliLog::Stream(AliLog::kError, 0, MODULENAME(), ClassName(), FUNCTIONNAME(), __FILE__, __LINE__)
628 #define AliErrorClassStream() AliLog::Stream(AliLog::kError, 0, MODULENAME(), Class()->GetName(), FUNCTIONNAME(), __FILE__, __LINE__)
629 #define AliErrorGeneralStream(scope) AliLog::Stream(AliLog::kError, 0, MODULENAME(), scope, FUNCTIONNAME(), __FILE__, __LINE__)
634 * Forwards to AliMessage with log level of AliLog::kFatal
637 #define AliFatal(message) AliMessage(AliLog::kFatal, message)
639 * Forwards to AliMessageClass with log level of AliLog::kFatal
640 * @see AliMessageClass
642 #define AliFatalClass(message) AliMessageClass(AliLog::kFatal, message)
644 * Forwards to AliMessageGeneral with log level of AliLog::kFatal
645 * @see AliMessageGeneral
647 #define AliFatalGeneral(scope, message) AliMessageGeneral(scope, AliLog::kFatal, message)
649 * Forwards to AliMessageF with log level of AliLog::kFatal
652 #define AliFatalF(message,...) AliMessageF(AliLog::kFatal, message, __VA_ARGS__)
654 * Forwards to AliMessageClassF with log level of AliLog::kFatal
655 * @see AliMessageClassF
657 #define AliFatalClassF(message,...) AliMessageClassF(AliLog::kFatal, message, __VA_ARGS__)
659 * Forwards to AliMessageGeneralF with log level of AliLog::kFatal
660 * @see AliMessageGeneralF
662 #define AliFatalGeneralF(scope,message,...) AliMessageGeneralF(scope, AliLog::kFatal, message, __VA_ARGS__)