winlin

extract log context, move log to kernel module.

@@ -133,7 +133,7 @@ CORE_OBJS="${MODULE_OBJS[@]}" @@ -133,7 +133,7 @@ CORE_OBJS="${MODULE_OBJS[@]}"
133 MODULE_ID="KERNEL" 133 MODULE_ID="KERNEL"
134 MODULE_DEPENDS=("CORE") 134 MODULE_DEPENDS=("CORE")
135 ModuleLibIncs=(${SRS_OBJS}) 135 ModuleLibIncs=(${SRS_OBJS})
136 -MODULE_FILES=("srs_kernel_error") 136 +MODULE_FILES=("srs_kernel_error" "srs_kernel_log")
137 MODULE_DIR="src/kernel" . auto/modules.sh 137 MODULE_DIR="src/kernel" . auto/modules.sh
138 KERNEL_OBJS="${MODULE_OBJS[@]}" 138 KERNEL_OBJS="${MODULE_OBJS[@]}"
139 # 139 #
@@ -141,7 +141,7 @@ KERNEL_OBJS="${MODULE_OBJS[@]}" @@ -141,7 +141,7 @@ KERNEL_OBJS="${MODULE_OBJS[@]}"
141 MODULE_ID="APP" 141 MODULE_ID="APP"
142 MODULE_DEPENDS=("CORE" "KERNEL") 142 MODULE_DEPENDS=("CORE" "KERNEL")
143 ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${LibSSLRoot} ${SRS_OBJS}) 143 ModuleLibIncs=(${LibSTRoot} ${LibHttpParserRoot} ${LibSSLRoot} ${SRS_OBJS})
144 -MODULE_FILES=("srs_core_log" "srs_core_server" 144 +MODULE_FILES=("srs_core_server"
145 "srs_core_conn" "srs_core_client" 145 "srs_core_conn" "srs_core_client"
146 "srs_core_rtmp" "srs_core_socket" "srs_core_buffer" 146 "srs_core_rtmp" "srs_core_socket" "srs_core_buffer"
147 "srs_core_protocol" "srs_core_amf0" 147 "srs_core_protocol" "srs_core_amf0"
@@ -150,7 +150,7 @@ MODULE_FILES=("srs_core_log" "srs_core_server" @@ -150,7 +150,7 @@ MODULE_FILES=("srs_core_log" "srs_core_server"
150 "srs_core_config" "srs_core_refer" "srs_core_reload" 150 "srs_core_config" "srs_core_refer" "srs_core_reload"
151 "srs_core_hls" "srs_core_forward" "srs_core_encoder" 151 "srs_core_hls" "srs_core_forward" "srs_core_encoder"
152 "srs_core_http" "srs_core_thread" "srs_core_bandwidth" 152 "srs_core_http" "srs_core_thread" "srs_core_bandwidth"
153 - "srs_core_st") 153 + "srs_core_st" "srs_core_log_context")
154 MODULE_DIR="src/app" . auto/modules.sh 154 MODULE_DIR="src/app" . auto/modules.sh
155 APP_OBJS="${MODULE_OBJS[@]}" 155 APP_OBJS="${MODULE_OBJS[@]}"
156 # 156 #
@@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 25
26 #include <utility> 26 #include <utility>
27 27
28 -#include <srs_core_log.hpp> 28 +#include <srs_kernel_log.hpp>
29 #include <srs_kernel_error.hpp> 29 #include <srs_kernel_error.hpp>
30 #include <srs_core_stream.hpp> 30 #include <srs_core_stream.hpp>
31 31
@@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 25
26 #include <srs_kernel_error.hpp> 26 #include <srs_kernel_error.hpp>
27 #include <srs_core_socket.hpp> 27 #include <srs_core_socket.hpp>
28 -#include <srs_core_log.hpp> 28 +#include <srs_kernel_log.hpp>
29 29
30 #define SOCKET_READ_SIZE 4096 30 #define SOCKET_READ_SIZE 4096
31 31
@@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 using namespace std; 29 using namespace std;
30 30
31 #include <srs_kernel_error.hpp> 31 #include <srs_kernel_error.hpp>
32 -#include <srs_core_log.hpp> 32 +#include <srs_kernel_log.hpp>
33 #include <srs_core_rtmp.hpp> 33 #include <srs_core_rtmp.hpp>
34 #include <srs_core_protocol.hpp> 34 #include <srs_core_protocol.hpp>
35 #include <srs_core_autofree.hpp> 35 #include <srs_core_autofree.hpp>
@@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 28
29 #include <srs_kernel_error.hpp> 29 #include <srs_kernel_error.hpp>
30 #include <srs_core_stream.hpp> 30 #include <srs_core_stream.hpp>
31 -#include <srs_core_log.hpp> 31 +#include <srs_kernel_log.hpp>
32 #include <srs_core_autofree.hpp> 32 #include <srs_core_autofree.hpp>
33 33
34 SrsCodecBuffer::SrsCodecBuffer() 34 SrsCodecBuffer::SrsCodecBuffer()
@@ -38,7 +38,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -38,7 +38,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 using namespace std; 38 using namespace std;
39 39
40 #include <srs_kernel_error.hpp> 40 #include <srs_kernel_error.hpp>
41 -#include <srs_core_log.hpp> 41 +#include <srs_kernel_log.hpp>
42 #include <srs_core_autofree.hpp> 42 #include <srs_core_autofree.hpp>
43 43
44 #define FILE_OFFSET(fd) lseek(fd, 0, SEEK_CUR) 44 #define FILE_OFFSET(fd) lseek(fd, 0, SEEK_CUR)
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23
24 #include <srs_core_conn.hpp> 24 #include <srs_core_conn.hpp>
25 25
26 -#include <srs_core_log.hpp> 26 +#include <srs_kernel_log.hpp>
27 #include <srs_kernel_error.hpp> 27 #include <srs_kernel_error.hpp>
28 #include <srs_core_server.hpp> 28 #include <srs_core_server.hpp>
29 29
@@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -33,7 +33,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 #include <algorithm> 33 #include <algorithm>
34 34
35 #include <srs_kernel_error.hpp> 35 #include <srs_kernel_error.hpp>
36 -#include <srs_core_log.hpp> 36 +#include <srs_kernel_log.hpp>
37 #include <srs_core_config.hpp> 37 #include <srs_core_config.hpp>
38 #include <srs_core_rtmp.hpp> 38 #include <srs_core_rtmp.hpp>
39 #include <srs_core_pithy_print.hpp> 39 #include <srs_core_pithy_print.hpp>
@@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 30
31 #include <srs_kernel_error.hpp> 31 #include <srs_kernel_error.hpp>
32 #include <srs_core_rtmp.hpp> 32 #include <srs_core_rtmp.hpp>
33 -#include <srs_core_log.hpp> 33 +#include <srs_kernel_log.hpp>
34 #include <srs_core_protocol.hpp> 34 #include <srs_core_protocol.hpp>
35 #include <srs_core_pithy_print.hpp> 35 #include <srs_core_pithy_print.hpp>
36 #include <srs_core_rtmp.hpp> 36 #include <srs_core_rtmp.hpp>
@@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -27,7 +27,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #include <stdlib.h> 27 #include <stdlib.h>
28 28
29 #include <srs_kernel_error.hpp> 29 #include <srs_kernel_error.hpp>
30 -#include <srs_core_log.hpp> 30 +#include <srs_kernel_log.hpp>
31 #include <srs_core_autofree.hpp> 31 #include <srs_core_autofree.hpp>
32 #include <srs_core_socket.hpp> 32 #include <srs_core_socket.hpp>
33 33
@@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 34
35 #include <srs_kernel_error.hpp> 35 #include <srs_kernel_error.hpp>
36 #include <srs_core_rtmp.hpp> 36 #include <srs_core_rtmp.hpp>
37 -#include <srs_core_log.hpp> 37 +#include <srs_kernel_log.hpp>
38 #include <srs_core_socket.hpp> 38 #include <srs_core_socket.hpp>
39 39
40 #define SRS_DEFAULT_HTTP_PORT 80 40 #define SRS_DEFAULT_HTTP_PORT 80
@@ -21,64 +21,20 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN @@ -21,64 +21,20 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */ 22 */
23 23
24 -#include <srs_core_log.hpp> 24 +#include <srs_core_log_context.hpp>
25 25
26 -#include <string.h>  
27 -#include <sys/time.h> 26 +ILogContext* log_context = new SrsLogContext();
28 27
29 -#include <string>  
30 -#include <map>  
31 -  
32 -#include <st.h>  
33 -  
34 -ILogContext::ILogContext()  
35 -{  
36 -}  
37 -  
38 -ILogContext::~ILogContext()  
39 -{  
40 -}  
41 -  
42 -class LogContext : public ILogContext  
43 -{  
44 -private:  
45 - class DateTime  
46 - {  
47 - private:  
48 - // %d-%02d-%02d %02d:%02d:%02d.%03d  
49 - #define DATE_LEN 24  
50 - char time_data[DATE_LEN];  
51 - public:  
52 - DateTime();  
53 - virtual ~DateTime();  
54 - public:  
55 - virtual const char* format_time();  
56 - };  
57 -private:  
58 - DateTime time;  
59 - std::map<st_thread_t, int> cache;  
60 -public:  
61 - LogContext();  
62 - virtual ~LogContext();  
63 -public:  
64 - virtual void generate_id();  
65 - virtual int get_id();  
66 -public:  
67 - virtual const char* format_time();  
68 -};  
69 -  
70 -ILogContext* log_context = new LogContext();  
71 -  
72 -LogContext::DateTime::DateTime() 28 +SrsLogContext::DateTime::DateTime()
73 { 29 {
74 memset(time_data, 0, DATE_LEN); 30 memset(time_data, 0, DATE_LEN);
75 } 31 }
76 32
77 -LogContext::DateTime::~DateTime() 33 +SrsLogContext::DateTime::~DateTime()
78 { 34 {
79 } 35 }
80 36
81 -const char* LogContext::DateTime::format_time() 37 +const char* SrsLogContext::DateTime::format_time()
82 { 38 {
83 // clock time 39 // clock time
84 timeval tv; 40 timeval tv;
@@ -100,27 +56,26 @@ const char* LogContext::DateTime::format_time() @@ -100,27 +56,26 @@ const char* LogContext::DateTime::format_time()
100 return time_data; 56 return time_data;
101 } 57 }
102 58
103 -LogContext::LogContext() 59 +SrsLogContext::SrsLogContext()
104 { 60 {
105 } 61 }
106 62
107 -LogContext::~LogContext() 63 +SrsLogContext::~SrsLogContext()
108 { 64 {
109 } 65 }
110 66
111 -void LogContext::generate_id() 67 +void SrsLogContext::generate_id()
112 { 68 {
113 static int id = 1; 69 static int id = 1;
114 cache[st_thread_self()] = id++; 70 cache[st_thread_self()] = id++;
115 } 71 }
116 72
117 -int LogContext::get_id() 73 +int SrsLogContext::get_id()
118 { 74 {
119 return cache[st_thread_self()]; 75 return cache[st_thread_self()];
120 } 76 }
121 77
122 -const char* LogContext::format_time() 78 +const char* SrsLogContext::format_time()
123 { 79 {
124 return time.format_time(); 80 return time.format_time();
125 } 81 }
126 -  
  1 +/*
  2 +The MIT License (MIT)
  3 +
  4 +Copyright (c) 2013-2014 winlin
  5 +
  6 +Permission is hereby granted, free of charge, to any person obtaining a copy of
  7 +this software and associated documentation files (the "Software"), to deal in
  8 +the Software without restriction, including without limitation the rights to
  9 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  10 +the Software, and to permit persons to whom the Software is furnished to do so,
  11 +subject to the following conditions:
  12 +
  13 +The above copyright notice and this permission notice shall be included in all
  14 +copies or substantial portions of the Software.
  15 +
  16 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  18 +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  19 +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  20 +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21 +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22 +*/
  23 +
  24 +#ifndef SRS_CORE_LOG_CONTEXT_HPP
  25 +#define SRS_CORE_LOG_CONTEXT_HPP
  26 +
  27 +/*
  28 +#include <srs_core_log_context.hpp>
  29 +*/
  30 +
  31 +#include <srs_core.hpp>
  32 +
  33 +#include <srs_core_st.hpp>
  34 +#include <srs_kernel_log.hpp>
  35 +
  36 +#include <string.h>
  37 +#include <sys/time.h>
  38 +
  39 +#include <string>
  40 +#include <map>
  41 +
  42 +class SrsLogContext : public ILogContext
  43 +{
  44 +private:
  45 + class DateTime
  46 + {
  47 + private:
  48 + // %d-%02d-%02d %02d:%02d:%02d.%03d
  49 + #define DATE_LEN 24
  50 + char time_data[DATE_LEN];
  51 + public:
  52 + DateTime();
  53 + virtual ~DateTime();
  54 + public:
  55 + virtual const char* format_time();
  56 + };
  57 +private:
  58 + DateTime time;
  59 + std::map<st_thread_t, int> cache;
  60 +public:
  61 + SrsLogContext();
  62 + virtual ~SrsLogContext();
  63 +public:
  64 + virtual void generate_id();
  65 + virtual int get_id();
  66 +public:
  67 + virtual const char* format_time();
  68 +};
  69 +
  70 +#endif
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 #include <stdlib.h> 26 #include <stdlib.h>
27 #include <map> 27 #include <map>
28 28
29 -#include <srs_core_log.hpp> 29 +#include <srs_kernel_log.hpp>
30 #include <srs_core_config.hpp> 30 #include <srs_core_config.hpp>
31 #include <srs_core_reload.hpp> 31 #include <srs_core_reload.hpp>
32 #include <srs_kernel_error.hpp> 32 #include <srs_kernel_error.hpp>
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23
24 #include <srs_core_protocol.hpp> 24 #include <srs_core_protocol.hpp>
25 25
26 -#include <srs_core_log.hpp> 26 +#include <srs_kernel_log.hpp>
27 #include <srs_core_amf0.hpp> 27 #include <srs_core_amf0.hpp>
28 #include <srs_kernel_error.hpp> 28 #include <srs_kernel_error.hpp>
29 #include <srs_core_socket.hpp> 29 #include <srs_core_socket.hpp>
@@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -34,7 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 #include <string> 34 #include <string>
35 35
36 #include <srs_core_st.hpp> 36 #include <srs_core_st.hpp>
37 -#include <srs_core_log.hpp> 37 +#include <srs_kernel_log.hpp>
38 #include <srs_kernel_error.hpp> 38 #include <srs_kernel_error.hpp>
39 39
40 // the following is the timeout for rtmp protocol, 40 // the following is the timeout for rtmp protocol,
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 #include <srs_core_refer.hpp> 24 #include <srs_core_refer.hpp>
25 25
26 #include <srs_kernel_error.hpp> 26 #include <srs_kernel_error.hpp>
27 -#include <srs_core_log.hpp> 27 +#include <srs_kernel_log.hpp>
28 #include <srs_core_config.hpp> 28 #include <srs_core_config.hpp>
29 29
30 int SrsRefer::check(std::string page_url, SrsConfDirective* refer) 30 int SrsRefer::check(std::string page_url, SrsConfDirective* refer)
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23
24 #include <srs_core_rtmp.hpp> 24 #include <srs_core_rtmp.hpp>
25 25
26 -#include <srs_core_log.hpp> 26 +#include <srs_kernel_log.hpp>
27 #include <srs_kernel_error.hpp> 27 #include <srs_kernel_error.hpp>
28 #include <srs_core_socket.hpp> 28 #include <srs_core_socket.hpp>
29 #include <srs_core_protocol.hpp> 29 #include <srs_core_protocol.hpp>
@@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -30,7 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 30
31 #include <algorithm> 31 #include <algorithm>
32 32
33 -#include <srs_core_log.hpp> 33 +#include <srs_kernel_log.hpp>
34 #include <srs_kernel_error.hpp> 34 #include <srs_kernel_error.hpp>
35 #include <srs_core_client.hpp> 35 #include <srs_core_client.hpp>
36 #include <srs_core_config.hpp> 36 #include <srs_core_config.hpp>
@@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 #include <algorithm> 26 #include <algorithm>
27 using namespace std; 27 using namespace std;
28 28
29 -#include <srs_core_log.hpp> 29 +#include <srs_kernel_log.hpp>
30 #include <srs_core_protocol.hpp> 30 #include <srs_core_protocol.hpp>
31 #include <srs_core_autofree.hpp> 31 #include <srs_core_autofree.hpp>
32 #include <srs_core_amf0.hpp> 32 #include <srs_core_amf0.hpp>
@@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -23,7 +23,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 23
24 #include <srs_core_stream.hpp> 24 #include <srs_core_stream.hpp>
25 25
26 -#include <srs_core_log.hpp> 26 +#include <srs_kernel_log.hpp>
27 #include <srs_kernel_error.hpp> 27 #include <srs_kernel_error.hpp>
28 28
29 SrsStream::SrsStream() 29 SrsStream::SrsStream()
@@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 #include <srs_core_thread.hpp> 24 #include <srs_core_thread.hpp>
25 25
26 #include <srs_kernel_error.hpp> 26 #include <srs_kernel_error.hpp>
27 -#include <srs_core_log.hpp> 27 +#include <srs_kernel_log.hpp>
28 28
29 ISrsThreadHandler::ISrsThreadHandler() 29 ISrsThreadHandler::ISrsThreadHandler()
30 { 30 {
  1 +/*
  2 +The MIT License (MIT)
  3 +
  4 +Copyright (c) 2013-2014 winlin
  5 +
  6 +Permission is hereby granted, free of charge, to any person obtaining a copy of
  7 +this software and associated documentation files (the "Software"), to deal in
  8 +the Software without restriction, including without limitation the rights to
  9 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  10 +the Software, and to permit persons to whom the Software is furnished to do so,
  11 +subject to the following conditions:
  12 +
  13 +The above copyright notice and this permission notice shall be included in all
  14 +copies or substantial portions of the Software.
  15 +
  16 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  18 +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  19 +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  20 +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21 +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22 +*/
  23 +
  24 +#include <srs_kernel_log.hpp>
  25 +
  26 +ILogContext::ILogContext()
  27 +{
  28 +}
  29 +
  30 +ILogContext::~ILogContext()
  31 +{
  32 +}
  33 +
@@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -25,7 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 #define SRS_CORE_LOG_HPP 25 #define SRS_CORE_LOG_HPP
26 26
27 /* 27 /*
28 -#include <srs_core_log.hpp> 28 +#include <srs_kernel_log.hpp>
29 */ 29 */
30 30
31 #include <srs_core.hpp> 31 #include <srs_core.hpp>
@@ -21,7 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN @@ -21,7 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */ 22 */
23 23
24 -#include <srs_core_log.hpp> 24 +#include <srs_kernel_log.hpp>
25 #include <srs_kernel_error.hpp> 25 #include <srs_kernel_error.hpp>
26 #include <srs_core_server.hpp> 26 #include <srs_core_server.hpp>
27 #include <srs_core_config.hpp> 27 #include <srs_core_config.hpp>
@@ -12,6 +12,8 @@ file @@ -12,6 +12,8 @@ file
12 kernel readonly separator, 12 kernel readonly separator,
13 ..\kernel\srs_kernel_error.hpp, 13 ..\kernel\srs_kernel_error.hpp,
14 ..\kernel\srs_kernel_error.cpp, 14 ..\kernel\srs_kernel_error.cpp,
  15 + ..\kernel\srs_kernel_log.hpp,
  16 + ..\kernel\srs_kernel_log.cpp,
15 app readonly separator, 17 app readonly separator,
16 ..\app\srs_core_amf0.hpp, 18 ..\app\srs_core_amf0.hpp,
17 ..\app\srs_core_amf0.cpp, 19 ..\app\srs_core_amf0.cpp,
@@ -37,8 +39,8 @@ file @@ -37,8 +39,8 @@ file
37 ..\app\srs_core_hls.cpp, 39 ..\app\srs_core_hls.cpp,
38 ..\app\srs_core_http.hpp, 40 ..\app\srs_core_http.hpp,
39 ..\app\srs_core_http.cpp, 41 ..\app\srs_core_http.cpp,
40 - ..\app\srs_core_log.hpp,  
41 - ..\app\srs_core_log.cpp, 42 + ..\app\srs_core_log_context.hpp,
  43 + ..\app\srs_core_log_context.cpp,
42 ..\app\srs_core_pithy_print.hpp, 44 ..\app\srs_core_pithy_print.hpp,
43 ..\app\srs_core_pithy_print.cpp, 45 ..\app\srs_core_pithy_print.cpp,
44 ..\app\srs_core_protocol.hpp, 46 ..\app\srs_core_protocol.hpp,