merge from 1.0.18, hotfix #207, trim the last 0 of log. 2.0.85
正在显示
3 个修改的文件
包含
6 行增加
和
5 行删除
@@ -501,6 +501,7 @@ Supported operating systems and hardware: | @@ -501,6 +501,7 @@ Supported operating systems and hardware: | ||
501 | * 2013-10-17, Created.<br/> | 501 | * 2013-10-17, Created.<br/> |
502 | 502 | ||
503 | ## History | 503 | ## History |
504 | +* v2.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 2.0.85 | ||
504 | * v2.0, 2014-01-02, fix [#158](https://github.com/winlinvip/simple-rtmp-server/issues/158), http-callback check http status code ok(200). 2.0.84 | 505 | * v2.0, 2014-01-02, fix [#158](https://github.com/winlinvip/simple-rtmp-server/issues/158), http-callback check http status code ok(200). 2.0.84 |
505 | * v2.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 2.0.83 | 506 | * v2.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 2.0.83 |
506 | * v2.0, 2014-01-02, fix [#263](https://github.com/winlinvip/simple-rtmp-server/issues/263), srs-librtmp flv read tag should init size. 2.0.82 | 507 | * v2.0, 2014-01-02, fix [#263](https://github.com/winlinvip/simple-rtmp-server/issues/263), srs-librtmp flv read tag should init size. 2.0.82 |
@@ -549,6 +550,7 @@ Supported operating systems and hardware: | @@ -549,6 +550,7 @@ Supported operating systems and hardware: | ||
549 | * v2.0, 2014-10-18, remove supports for OSX(darwin). 2.0.1. | 550 | * v2.0, 2014-10-18, remove supports for OSX(darwin). 2.0.1. |
550 | * v2.0, 2014-10-16, revert github srs README to English. 2.0.0. | 551 | * v2.0, 2014-10-16, revert github srs README to English. 2.0.0. |
551 | 552 | ||
553 | +* v1.0, 2015-01-02, hotfix [#207](https://github.com/winlinvip/simple-rtmp-server/issues/207), trim the last 0 of log. 1.0.18 | ||
552 | * v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17 | 554 | * v1.0, 2015-01-02, hotfix [#216](https://github.com/winlinvip/simple-rtmp-server/issues/216), http-callback post in application/json content-type. 1.0.17 |
553 | * v1.0, 2015-01-01, hotfix [#270](https://github.com/winlinvip/simple-rtmp-server/issues/270), memory leak for http client post. 1.0.16 | 555 | * v1.0, 2015-01-01, hotfix [#270](https://github.com/winlinvip/simple-rtmp-server/issues/270), memory leak for http client post. 1.0.16 |
554 | * v1.0, 2014-12-29, hotfix [#267](https://github.com/winlinvip/simple-rtmp-server/issues/267), the forward dest ep should use server. 1.0.15 | 556 | * v1.0, 2014-12-29, hotfix [#267](https://github.com/winlinvip/simple-rtmp-server/issues/267), the forward dest ep should use server. 1.0.15 |
@@ -326,7 +326,6 @@ void SrsFastLog::write_log(int& fd, char *str_log, int size, int level) | @@ -326,7 +326,6 @@ void SrsFastLog::write_log(int& fd, char *str_log, int size, int level) | ||
326 | 326 | ||
327 | // add some to the end of char. | 327 | // add some to the end of char. |
328 | str_log[size++] = LOG_TAIL; | 328 | str_log[size++] = LOG_TAIL; |
329 | - str_log[size++] = 0; | ||
330 | 329 | ||
331 | // if not to file, to console and return. | 330 | // if not to file, to console and return. |
332 | if (!log_to_file_tank) { | 331 | if (!log_to_file_tank) { |
@@ -336,11 +335,11 @@ void SrsFastLog::write_log(int& fd, char *str_log, int size, int level) | @@ -336,11 +335,11 @@ void SrsFastLog::write_log(int& fd, char *str_log, int size, int level) | ||
336 | // \033[33m : yellow text code in shell | 335 | // \033[33m : yellow text code in shell |
337 | // \033[0m : normal text code | 336 | // \033[0m : normal text code |
338 | if (level <= SrsLogLevel::Trace) { | 337 | if (level <= SrsLogLevel::Trace) { |
339 | - printf("%s", str_log); | 338 | + printf("%.*s", size, str_log); |
340 | } else if (level == SrsLogLevel::Warn) { | 339 | } else if (level == SrsLogLevel::Warn) { |
341 | - printf("\033[33m%s\033[0m", str_log); | 340 | + printf("\033[33m%.*s\033[0m", size, str_log); |
342 | } else{ | 341 | } else{ |
343 | - printf("\033[31m%s\033[0m", str_log); | 342 | + printf("\033[31m%.*s\033[0m", size, str_log); |
344 | } | 343 | } |
345 | 344 | ||
346 | return; | 345 | return; |
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
31 | // current release version | 31 | // current release version |
32 | #define VERSION_MAJOR 2 | 32 | #define VERSION_MAJOR 2 |
33 | #define VERSION_MINOR 0 | 33 | #define VERSION_MINOR 0 |
34 | -#define VERSION_REVISION 84 | 34 | +#define VERSION_REVISION 85 |
35 | // server info. | 35 | // server info. |
36 | #define RTMP_SIG_SRS_KEY "SRS" | 36 | #define RTMP_SIG_SRS_KEY "SRS" |
37 | #define RTMP_SIG_SRS_ROLE "origin/edge server" | 37 | #define RTMP_SIG_SRS_ROLE "origin/edge server" |
-
请 注册 或 登录 后发表评论