1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #pragma once
- #include <string>
- #ifdef Log4CPP_TLSLog_EXPORTS
- #define __Log4CPP_TLSLog_API _declspec(dllexport)
- #else
- #define __Log4CPP_TLSLog_API _declspec(dllimport)
- #endif
- //-----------------------------------------------------------------------------
- // Log4CPP::Context
- //-----------------------------------------------------------------------------
- namespace Log4CPP
- {
- namespace ThreadContext
- {
- //-----------------------------------------------------------------------------
- // TLSMessage
- //-----------------------------------------------------------------------------
- class __Log4CPP_TLSLog_API TLSMessage
- {
- protected:
- TLSMessage () = delete;
- public:
- static char * Get ();
- static int Size ();
- };
- //-----------------------------------------------------------------------------
- // TLSLayout
- //-----------------------------------------------------------------------------
- class __Log4CPP_TLSLog_API TLSLayout
- {
- protected:
- TLSLayout () = delete;
- public:
- static char * Get ();
- static int Size ();
- };
- #if 0
- //-----------------------------------------------------------------------------
- // ThreadName
- // 在异步缓存时, 线程名称没法转移
- //-----------------------------------------------------------------------------
- class __Log4CPP_TLSLog_API ThreadName
- {
- protected:
- ThreadName () = delete;
- public:
- static const char * Get ();
- static void Set (const char * Name);
- };
- #endif
- //-----------------------------------------------------------------------------
- // ThreadName
- // 仅供 Log4CPP 内部使用, 避免跟调用者的 Buffer 混淆
- //-----------------------------------------------------------------------------
- class __Log4CPP_TLSLog_API TLSInternal
- {
- protected:
- TLSInternal () = delete;
- public:
- static char * Get ();
- static int Size ();
- };
- }
- };
|