- qtgui
- qtdbus
- qtwidgets
- qtcore
- dtkcore
- qsettingbackend_zh
- dobject_zh
- abstractappender_zh
- abstractstringappender_zh
- dfilewatcher_zh
- outputdebugappender_zh
- dsettingsbackend_zh
- drecentmanager_zh
- ddesktopentry_zh
- consoleappender_zh
- gsettingsbackend_zh
- dsettingsgroup_zh
- dlogmanager_zh
- fileappender_zh
- dsettings_zh
- dfilesystemwatcher_zh
- dfilewatchermanager_zh
- dbasefilewatcher_zh
- dtkgui
- dtkwidget
- dviewitemaction_zh
- dstandarditem_zh
- dfiledialog_zh
- dclipeffectwidget_zh
- danchors_zh
- dgraphicsclipeffect_zh
- dstyle_zh
- dcoloredprogressbar_zh
- dbuttonboxbutton_zh
- dlabel_zh
- dtiplabel_zh
- darrowlinedrawer_zh
- daboutdialog_zh
- dsettingswidgetfactory_zh
- dsearchcombobox_zh
- dcrumbedit_zh
- dcommandlinkbutton_zh
- dsettingsdialog_zh
- dwindowoptionbutton_zh
- dspinner_zh
- dsimplelistview_zh
- dwaterprogress_zh
- dmainwindow_zh
- dhidpihelper_zh
- dslider_zh
- dpasswordedit_zh
- danchorinfo_zh
- dmpriscontrol_zh
- darrowbutton_zh
- dbackgroundgroup_zh
- dcircleprogress_zh
- dwarningbutton_zh
- dwindowclosebutton_zh
- dvideowidget_zh
- dfilechooseredit_zh
- dblureffectwidget_zh
- darrowrectangle_zh
- dsearchedit_zh
- dfloatingmessage_zh
- dswitchlineexpand_zh
- dtabbar_zh
- dlineedit_zh
- danchorsbase_zh
- dstylediconengine_zh
- dwindowmaxbutton_zh
- dpageindicator_zh
- dsuggestbutton_zh
- dapplicationsettings_zh
- dtooltip_zh
- dwindowminbutton_zh
- ddrawer_zh
- dtitlebar_zh
- dsimplelistitem_zh
- dpicturesequenceview_zh
abstractappender_zh
Class::AbstractAppender
暂无该属性
Detailed Description
The AbstractAppender class provides an abstract base class for writing a log entries. The AbstractAppender class is the base interface class for all log appenders that could be used with Logger.
AbstractAppender provides a common implementation for the thread safe, mutex-protected logging of application messages, such as ConsoleAppender , FileAppender or something else. AbstractAppender is abstract and can not be instantiated, but you can use any of its subclasses or create a custom log appender at your choice.
Appenders are the logical devices that is aimed to be attached to Logger object by calling Logger::registerAppender() . On each log record call from the application Logger object sequentially calls write() function on all the appenders registered in it.
You can subclass AbstractAppender to implement a logging target of any kind you like. It may be the external logging subsystem (for example, syslog in *nix), XML file, SQL database entries, D-Bus messages or anything else you can imagine.
For the simple non-structured plain text logging (for example, to a plain text file or to the console output) you may like to subclass the AbstractStringAppender instead of AbstractAppender , which will give you a more convenient way to control the format of the log output.
See also AbstractStringAppender Logger::registerAppender()
AbstractAppender::AbstractAppender
AbstractAppender()
AbstractAppender::~AbstractAppender
~AbstractAppender()
AbstractAppender::detailsLevel
Logger::LogLevel detailsLevel() const Log records with a log level lower than a current will be silently ignored by appender and would not be sent to its append() function.
It provides additional logging flexibility, allowing you to set the different severity levels for different types of logs.
Note: This function is thread safe.
See also setDetailsLevel() Logger::LogLevel
AbstractAppender::setDetailsLevel
void setDetailsLevel(Logger::LogLevel level) Default details level is Logger::Debug
Note: This function is thread safe.
See also detailsLevel() Logger::LogLevel
AbstractAppender::setDetailsLevel
void setDetailsLevel(const QString &level) This function is provided for convenience, it behaves like an above function.
See also detailsLevel() Logger::LogLevel
AbstractAppender::write
void write(const QDateTime &timeStamp, Logger::LogLevel logLevel, const char *file, int line, const char *function, const QString &category, const QString &message) This is the function called by Logger object to write a log message to the appender.
Note: This function is thread safe.
See also Logger::write() detailsLevel()
AbstractAppender::append
void append(const QDateTime &timeStamp, Logger::LogLevel logLevel, const char *file, int line, const char *function, const QString &category, const QString &message) = 0