|
@@ -559,6 +559,7 @@ class jlib_decl LogMsg : public CInterface
|
|
|
public:
|
|
|
LogMsg() : category(), sysInfo(), jobInfo(), remoteFlag(false) {}
|
|
|
LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, const char * _text, unsigned _compo, unsigned port, LogMsgSessionId session) : category(_cat), sysInfo(_id, port, session), jobInfo(_jobInfo), msgCode(_code), component(_compo), remoteFlag(false) { text.append(_text); }
|
|
|
+ LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, size32_t sz, const char * _text, unsigned _compo, unsigned port, LogMsgSessionId session) : category(_cat), sysInfo(_id, port, session), jobInfo(_jobInfo), msgCode(_code), component(_compo), remoteFlag(false) { text.append(sz, _text); }
|
|
|
LogMsg(const LogMsgCategory & _cat, LogMsgId _id, const LogMsgJobInfo & _jobInfo, LogMsgCode _code, const char * format, va_list args,
|
|
|
unsigned _compo, unsigned port, LogMsgSessionId session) __attribute__((format(printf,6, 0)))
|
|
|
: category(_cat), sysInfo(_id, port, session), jobInfo(_jobInfo), msgCode(_code), component(_compo), remoteFlag(false) { text.valist_appendf(format, args); }
|
|
@@ -702,6 +703,10 @@ interface jlib_decl ILogMsgManager : public ILogMsgListener
|
|
|
virtual void report(unsigned compo, const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, ...) __attribute__((format(printf, 6, 7))) = 0;
|
|
|
virtual void report_va(unsigned compo, const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code , const char * format, va_list args) = 0;
|
|
|
virtual void report(unsigned compo, const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL) = 0;
|
|
|
+ virtual void mreport_direct(unsigned compo, const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * msg) = 0;
|
|
|
+ virtual void mreport_direct(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * msg) = 0;
|
|
|
+ virtual void mreport_va(unsigned compo, const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) = 0;
|
|
|
+ virtual void mreport_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args) = 0;
|
|
|
virtual void report(const LogMsg & msg) const = 0;
|
|
|
virtual LogMsgId getNextID() = 0;
|
|
|
virtual bool rejectsCategory(const LogMsgCategory & cat) const = 0;
|
|
@@ -727,6 +732,8 @@ public:
|
|
|
void report_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, LogMsgCode code, const char * format, va_list args);
|
|
|
void report(const LogMsgCategory & cat, const LogMsgJobInfo & job, const IException * e, const char * prefix = NULL);
|
|
|
void report(const LogMsg & msg);
|
|
|
+ void mreport_direct(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * msg);
|
|
|
+ void mreport_va(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, va_list args);
|
|
|
private:
|
|
|
unsigned component;
|
|
|
};
|
|
@@ -1060,6 +1067,36 @@ inline void PROGLOG(const char * format, ...)
|
|
|
va_end(args);
|
|
|
}
|
|
|
|
|
|
+inline void MLOG(const LogMsgCategory & cat, const char * msg)
|
|
|
+{
|
|
|
+ LOGMSGREPORTER->mreport_direct(cat, unknownJob, msg);
|
|
|
+}
|
|
|
+
|
|
|
+inline void MLOG(const LogMsgCategory & cat, const LogMsgJobInfo & job, const char * format, ...)
|
|
|
+{
|
|
|
+ va_list args;
|
|
|
+ va_start(args, format);
|
|
|
+ LOGMSGREPORTER->mreport_va(cat, job, format, args);
|
|
|
+ va_end(args);
|
|
|
+}
|
|
|
+
|
|
|
+inline void MLOG(const LogMsgCategory & cat, const char * format, ...)
|
|
|
+{
|
|
|
+ va_list args;
|
|
|
+ va_start(args, format);
|
|
|
+ LOGMSGREPORTER->mreport_va(cat, unknownJob, format, args);
|
|
|
+ va_end(args);
|
|
|
+}
|
|
|
+
|
|
|
+inline void MLOG(const char * format, ...) __attribute__((format(printf, 1, 2)));
|
|
|
+inline void MLOG(const char * format, ...)
|
|
|
+{
|
|
|
+ va_list args;
|
|
|
+ va_start(args, format);
|
|
|
+ LOGMSGREPORTER->mreport_va(MCuserProgress, unknownJob, format, args);
|
|
|
+ va_end(args);
|
|
|
+}
|
|
|
+
|
|
|
inline void DBGLOG(LogMsgCode code, char const * format, ...) __attribute__((format(printf, 2, 3)));
|
|
|
inline void DBGLOG(LogMsgCode code, char const * format, ...)
|
|
|
{
|
|
@@ -1219,6 +1256,7 @@ extern jlib_decl void AuditSystemAccess(const char *userid, bool success, char c
|
|
|
interface jlib_decl IContextLogger : extends IInterface
|
|
|
{
|
|
|
void CTXLOG(const char *format, ...) const __attribute__((format(printf, 2, 3)));
|
|
|
+ void mCTXLOG(const char *format, ...) const __attribute__((format(printf, 2, 3)));
|
|
|
virtual void CTXLOGva(const char *format, va_list args) const __attribute__((format(printf,2,0))) = 0;
|
|
|
void logOperatorException(IException *E, const char *file, unsigned line, const char *format, ...) const __attribute__((format(printf, 5, 6)));
|
|
|
virtual void logOperatorExceptionVA(IException *E, const char *file, unsigned line, const char *format, va_list args) const __attribute__((format(printf,5,0))) = 0;
|