#include <TGo4Log.h>
Public Methods | |
virtual | ~TGo4Log () |
Static Public Methods | |
TGo4Log * | Instance () |
void | SetIgnoreLevel (Int_t level) |
Define threshold for output. More... | |
Int_t | GetIgnoreLevel () |
Get threshold for output. More... | |
void | OutputEnable (Bool_t on=kTRUE) |
switch output on or off. More... | |
Bool_t | IsOutputEnabled () |
get current output state. More... | |
void | LogfileEnable (Bool_t on=kTRUE) |
switch writing to logfile on or off. More... | |
Bool_t | IsLogfileEnabled () |
get current logfile state. More... | |
void | AutoEnable (Bool_t on=kTRUE) |
set boolean for user action. More... | |
Bool_t | IsAutoEnabled () |
get current user boolean. More... | |
void | OpenLogfile (const Text_t *name=0, const Text_t *headercomment=0, Bool_t appendmode=kFALSE) |
Open file of name for logmessage output. More... | |
void | CloseLogfile () |
Close logfile if existing. More... | |
const Text_t * | GetLogname () |
get name of last opened logfile. More... | |
const Text_t * | Message (Int_t prio, const Text_t *text,...) |
Display a message. More... | |
void | Debug (const Text_t *text,...) |
User shortcut for message with prio 0. More... | |
void | Info (const Text_t *text,...) |
User shortcut for message with prio 1. More... | |
void | Warn (const Text_t *text,...) |
User shortcut for message with prio 2. More... | |
void | Error (const Text_t *text,...) |
User shortcut for message with prio 3. More... | |
void | WriteLogfile (const Text_t *text, Bool_t withtime=kTRUE) |
Write text to current logfile if this is open. More... | |
void | set_trace_level (int) |
dummy for compatibility. More... | |
void | SetTracePriority (int) |
dummy for compatibility. More... | |
void | StartTracing () |
For backward compatibility. More... | |
void | StopTracing () |
For backward compatibility. More... | |
Static Public Attributes | |
const Text_t | fgcLEFT [] = "GO4-" |
Prompt character left side. More... | |
const Text_t | fgcRIGHT [] = " " |
Prompt character right side. More... | |
const Text_t | fgcDEBUG [] = "d" |
System debug message indicator. More... | |
const Text_t | fgcINFO [] = "*" |
Info message indicator. More... | |
const Text_t | fgcWARN [] = "#" |
Warning message indicator. More... | |
const Text_t | fgcERR [] = "!" |
Error message indicator. More... | |
const Text_t | fgcDEFAULTLOG [] = "go4logfile.txt" |
Name of default logfile. More... | |
const UInt_t | fguMESLEN = __MESSAGETEXTLENGTH__ |
Maximum message length allowd. More... | |
Private Methods | |
TGo4Log () | |
Static Private Attributes | |
TGo4Log * | fgxInstance = 0 |
TMutex * | fgxMutex = 0 |
we use own mutex to protect the logging instance. More... | |
Int_t | fgiIgnoreLevel = 1 |
all Messages with lower level are suppressed. More... | |
Bool_t | fgbOutputEnabled = kTRUE |
General switch on/off log output. More... | |
Bool_t | fgbLogfileEnabled = kTRUE |
General switch on/off log file output. More... | |
Bool_t | fgbAutoMode = kFALSE |
User boolean to write log on demand or not. More... | |
Text_t | fgcMessagetext [__MESSAGETEXTLENGTH__] |
Keeps latest message with all format indicators. More... | |
std::ofstream * | fgxLogfile = 0 |
optional logfile to store messages with time. More... | |
TString | fgxLogName = TGo4Log::fgcDEFAULTLOG |
Name of last logfile set. More... |
Should replace the previous Trace mechanism.
Definition at line 44 of file TGo4Log.h.
|
Definition at line 58 of file TGo4Log.cxx. References CloseLogfile(). |
|
Definition at line 47 of file TGo4Log.cxx. References fgcDEFAULTLOG, fgxMutex, LogfileEnable(), and OpenLogfile(). Referenced by Instance(). |
|
Definition at line 63 of file TGo4Log.cxx. References fgxInstance, and TGo4Log(). Referenced by Debug(), Error(), Info(), main(), Message(), StartTracing(), StopTracing(), and Warn(). |
|
Define threshold for output.
Definition at line 175 of file TGo4Log.cxx. References fgiIgnoreLevel. Referenced by TGo4MainWindow::LogSettingsSlot(), main(), StartTracing(), and StopTracing(). |
|
Get threshold for output.
Definition at line 182 of file TGo4Log.cxx. References fgiIgnoreLevel. Referenced by TGo4ThreadHandler::DumpThreads(), TGo4Analysis::Process(), and TGo4AnalysisMainRunnable::Run(). |
|
switch output on or off.
Definition at line 193 of file TGo4Log.cxx. References fgbOutputEnabled. Referenced by TGo4MainWindow::LogSettingsSlot(), TGo4Analysis::SendMessageToGUI(), and TGo4Task::SendStatusMessage(). |
|
get current output state.
Definition at line 200 of file TGo4Log.cxx. References fgbOutputEnabled. Referenced by TGo4Analysis::SendMessageToGUI(), and TGo4Task::SendStatusMessage(). |
|
switch writing to logfile on or off.
Definition at line 205 of file TGo4Log.cxx. References fgbLogfileEnabled. Referenced by TGo4MainWindow::LogSettingsSlot(), main(), OpenLogfile(), and TGo4Log(). |
|
get current logfile state.
Definition at line 211 of file TGo4Log.cxx. References fgbLogfileEnabled. |
|
set boolean for user action.
Definition at line 216 of file TGo4Log.cxx. References fgbAutoMode. Referenced by TGo4MainWindow::LogSettingsSlot(). |
|
get current user boolean.
Definition at line 222 of file TGo4Log.cxx. References fgbAutoMode. Referenced by TGo4MainWindow::StatusMessage(). |
|
Open file of name for logmessage output. If name=0, use defaultname containing pid. Optionally, headercomment text is set at beginning of file. If appendmode is true, existing file of same name is reused and extended by new messages. Definition at line 229 of file TGo4Log.cxx. References CloseLogfile(), fguMESLEN, fgxLogfile, fgxLogName, LogfileEnable(), and WriteLogfile(). Referenced by TGo4MainWindow::LogSettingsSlot(), main(), and TGo4Log(). |
|
Close logfile if existing.
Definition at line 319 of file TGo4Log.cxx. References fgxLogfile. Referenced by OpenLogfile(), and ~TGo4Log(). |
|
get name of last opened logfile.
Definition at line 187 of file TGo4Log.cxx. References fgxLogName. |
|
Display a message. Argument pri defines message priority: 0: debug / trace output 1: info message 2: warning message >=3: error message Method returns formatted message string as printed out for further use Definition at line 71 of file TGo4Log.cxx. References fgcDEBUG, fgcERR, fgcINFO, fgcLEFT, fgcMessagetext, fgcRIGHT, fgcWARN, fgiIgnoreLevel, fguMESLEN, Instance(), and WriteLogfile(). Referenced by Debug(), Error(), TGo4ExportManager::Export(), TGo4ExportManager::ExportASCII(), TGo4ExportManager::ExportRadware(), TGo4ExportManager::ExportRoot(), TGo4BrowserSlots::ExportSelectedItems(), TGo4UserException::Handle(), Info(), TGo4WindowEditStatus::Print(), TGo4Condition::Print(), TGo4Marker::PrintMarker(), TGo4EventInfoSlots::PrintToLog(), TGo4Analysis::SendMessageToGUI(), TGo4Task::SendStatusMessage(), TGo4MainWindow::StatusMessage(), and Warn(). |
|
|
User shortcut for message with prio 1.
Definition at line 136 of file TGo4Log.cxx. References fgiIgnoreLevel, fguMESLEN, Instance(), and Message(). Referenced by TGo4TaskManager::AddClient(), TGo4TaskManager::DisConnectClient(), and TGo4FitPanelSlots::Fitter_PrintParameters(). |
|
User shortcut for message with prio 2.
Definition at line 149 of file TGo4Log.cxx. References fgiIgnoreLevel, fguMESLEN, Instance(), and Message(). Referenced by TGo4TaskManager::AddClient(), TGo4TaskManager::ClientLogin(), TGo4ClientTask::ConnectServer(), TGo4Command::RefuseCom(), TGo4WinCond::SetPainter(), TGo4PolyCond::SetPainter(), and TGo4CondArray::SetPainter(). |
|
User shortcut for message with prio 3.
Definition at line 162 of file TGo4Log.cxx. References fguMESLEN, Instance(), and Message(). Referenced by TGo4TaskManager::AddClient(), TGo4ClientTask::ConnectServer(), TGo4AnalysisStepException::Handle(), TXXXCalibPar::ReadDatabase(), TGo4AnalysisClient::TGo4AnalysisClient(), and TXXXCalibPar::UpdateFrom(). |
|
Write text to current logfile if this is open. Prefix current datime in each line if "withtime" is true Definition at line 280 of file TGo4Log.cxx. References fgbLogfileEnabled, fguMESLEN, and fgxLogfile. Referenced by Message(), and OpenLogfile(). |
|
dummy for compatibility.
|
|
dummy for compatibility.
|
|
For backward compatibility.
Definition at line 122 of file TGo4Log.h. References Instance(), and SetIgnoreLevel(). |
|
For backward compatibility.
Definition at line 125 of file TGo4Log.h. References Instance(), and SetIgnoreLevel(). |
|
Prompt character left side.
Definition at line 26 of file TGo4Log.cxx. Referenced by Message(). |
|
Prompt character right side.
Definition at line 28 of file TGo4Log.cxx. Referenced by Message(). |
|
System debug message indicator.
Definition at line 29 of file TGo4Log.cxx. Referenced by Message(). |
|
Info message indicator.
Definition at line 30 of file TGo4Log.cxx. Referenced by Message(). |
|
Warning message indicator.
Definition at line 31 of file TGo4Log.cxx. Referenced by Message(). |
|
Error message indicator.
Definition at line 32 of file TGo4Log.cxx. Referenced by Message(). |
|
Name of default logfile.
Definition at line 33 of file TGo4Log.cxx. Referenced by TGo4Log(). |
|
Maximum message length allowd.
Definition at line 34 of file TGo4Log.cxx. Referenced by Debug(), Error(), Info(), Message(), TGo4Analysis::Message(), OpenLogfile(), TGo4UserException::TGo4UserException(), Warn(), and WriteLogfile(). |
|
Definition at line 43 of file TGo4Log.cxx. Referenced by Instance(). |
|
we use own mutex to protect the logging instance.
Definition at line 42 of file TGo4Log.cxx. Referenced by TGo4Log(). |
|
all Messages with lower level are suppressed.
Definition at line 37 of file TGo4Log.cxx. Referenced by Debug(), GetIgnoreLevel(), Info(), Message(), SetIgnoreLevel(), and Warn(). |
|
General switch on/off log output.
Definition at line 38 of file TGo4Log.cxx. Referenced by IsOutputEnabled(), and OutputEnable(). |
|
General switch on/off log file output.
Definition at line 39 of file TGo4Log.cxx. Referenced by IsLogfileEnabled(), LogfileEnable(), and WriteLogfile(). |
|
User boolean to write log on demand or not.
Definition at line 40 of file TGo4Log.cxx. Referenced by AutoEnable(), and IsAutoEnabled(). |
|
Keeps latest message with all format indicators.
Definition at line 36 of file TGo4Log.cxx. Referenced by Message(). |
|
optional logfile to store messages with time.
Definition at line 41 of file TGo4Log.cxx. Referenced by CloseLogfile(), OpenLogfile(), and WriteLogfile(). |
|
Name of last logfile set.
Definition at line 45 of file TGo4Log.cxx. Referenced by GetLogname(), and OpenLogfile(). |