Commit Graph

249 Commits

Author SHA1 Message Date
Faissal Elamraoui 2bd743fcff Enhanced logging during DEV mode 2016-06-17 15:56:52 +02:00
nullne 2c12383263 remove attribute perm to make it more brief 2016-05-17 10:29:05 +08:00
nullne d679a4b865 fix bug with file permission in log module 2016-05-14 10:54:09 +08:00
JessonChan b28581a463 make daily rotate 2016-05-06 12:11:14 +08:00
JessonChan fa8d94fa69 file rotate by day test 2016-05-06 12:09:00 +08:00
JessonChan abaa1bbcac file rotate file test 2016-04-13 09:05:16 +08:00
JessonChan 22617aeb13 file rotate name fixed 2016-04-12 15:05:35 +08:00
JessonChan 96a5d09ef0 add format header test 2016-03-30 15:13:01 +08:00
JessonChan 814b673e3c add a comment to the future bug 2016-03-30 14:51:46 +08:00
JessonChan 99436a75b1 format time header 5% faster than before 2016-03-30 14:31:28 +08:00
JessonChan 8e82ed319b beelog bug fixed 2016-03-30 14:31:16 +08:00
astaxie 220cf91180 Merge pull request #1837 from JessonChan/develop
add function of beego/logs
2016-03-29 11:37:09 +08:00
JessonChan 221306fff4 file rotate bug 2016-03-29 10:05:56 +08:00
JessonChan f05bb2ecd3 add function of beego/logs 2016-03-28 15:18:51 +08:00
JessonChan 45f2390128 logger changed 2016-03-25 15:13:28 +08:00
JessonChan 826f81f479 remove from init method 2016-03-25 15:04:52 +08:00
JessonChan 52a0b657b7 for better performance 2016-03-24 20:27:00 +08:00
JessonChan f02ff0420d no need to call Sprintf when no args 2016-03-24 20:22:42 +08:00
JessonChan 06299fa47b makes console as default logger 2016-03-24 19:32:29 +08:00
JessonChan d8bed89c44 set console as default logger 2016-03-24 19:15:14 +08:00
JessonChan 0814eefa62 refactor writeMsg function 2016-03-24 18:21:52 +08:00
JessonChan 8344a60552 add to upper case 2016-03-24 17:49:39 +08:00
JessonChan 0fb4a8af24 function change 2016-03-24 17:46:52 +08:00
JessonChan a6c1377f91 change to 0 logger 2016-03-24 17:43:45 +08:00
JessonChan cdfd830f65 rename log format 2016-03-24 17:43:16 +08:00
JessonChan 03840f3fe8 give each of the adapter a neme 2016-03-24 17:38:26 +08:00
JessonChan 2e6a23743b refactor logs package 2016-03-24 17:37:56 +08:00
JessonChan 2b1316c738 data race bug fixed 2016-03-16 18:04:07 +08:00
astaxie c8bbfb75f0 Merge pull request #1782 from JessonChan/some_wip
BeeLogger can be the writer of  http server's log
2016-03-14 14:47:29 +08:00
JessonChan c92c3fc8b5 make the BeegoLogger a adapter of http server ErrorLog 2016-03-14 10:21:07 +08:00
astaxie 88816348b9 window console can't output colorful 2016-03-11 15:29:52 +08:00
astaxie 83fe43f331 gofmt -s -w 2016-03-11 13:00:58 +08:00
JessonChan 4801099675 duplicate adapter logger bug fixed 2016-03-11 10:12:17 +08:00
JessonChan f21cff0166 some typo fixed 2016-03-09 16:00:52 +08:00
JessonChan b2f071395b rename files to mulitfile 2016-03-08 18:44:39 +08:00
JessonChan 54b5120a64 rename files to mulitfile 2016-03-08 18:43:09 +08:00
JessonChan 3379a2b7ed remove file bug fixed
remove file by filename and file suffix
2016-03-04 10:43:57 +08:00
JessonChan ca3c57fbc6 add a line of comment 2016-03-01 17:13:50 +08:00
JessonChan 387dd6ec0e add a line of comment 2016-03-01 17:12:21 +08:00
JessonChan 26cc040f9a daily log name dot fixed 2016-03-01 17:00:24 +08:00
JessonChan 9da4d1d847 Merge branch 'develop' into log_enhancement 2016-03-01 13:59:27 +08:00
astaxie 6eaa5537f5 Merge pull request #1652 from JessonChan/develop
colorful console and go fmt
2016-02-26 16:10:11 +08:00
JessonChan 1f716dda3e add test files and bug fixed 2016-02-03 17:54:58 +08:00
JessonChan f8c4b3aa4c add files logger to separate different logs 2016-02-03 17:11:53 +08:00
JessonChan 51b1095e73 add files logger 2016-02-03 16:32:59 +08:00
JessonChan 68cc53e92b when rotate by date ,there's no num after log file 2016-02-03 15:43:15 +08:00
JessonChan 6caa3ecd91 when rotate by date ,there's no num after log file 2016-02-03 15:31:59 +08:00
JessonChan 304a5ccea0 comment fix 2016-02-03 15:06:53 +08:00
JessonChan 9806a43783 make more fast 2016-02-03 15:03:37 +08:00
JessonChan a1cb000701 remove log package 2016-02-03 14:42:38 +08:00
youngsterxyf 2efe7c4c89 merge multi commit 2016-02-02 17:12:47 +08:00
youngsterxyf c71ac7431d Merge branch 'develop' into logger-flush-close 2016-02-02 17:11:41 +08:00
JessonChan 5dec3d127c colorful console only the terminal supports 2016-02-02 16:37:09 +08:00
youngsterxyf ecab397073 try to fix the little bug when calling Close or Flush in async mode 2016-01-28 21:53:44 +08:00
Pelle Johnsen a043432398 Change option name from noColor to color
Still same default behavior (with color)
2016-01-28 07:50:07 +01:00
Pelle Johnsen 7f888e3d18 Add noColor option for console logger
- Also added simple test
2016-01-27 19:20:58 +01:00
youngsterxyf c59a029ce7 Merge branch 'develop' into config-logic 2016-01-27 10:58:38 +08:00
youngsterxyf 20efd5236e fix bug 2016-01-27 00:42:07 +08:00
JessonChan e11d150e8b replace \t with space 2016-01-26 09:35:39 +08:00
JessonChan f2567bc114 some typo fixed 2016-01-26 09:29:04 +08:00
JessonChan b5a07c6ba8 log file name bug fixed
this bug happens when daily rotate. ex,when it is 2016-01-22 23:59:59 and need a rotate,the file name should named with 2016-01-22 but named with 2016-01-23(next day)
2016-01-26 09:20:49 +08:00
youngsterxyf bcac4bb8e3 accept @JessonChan suggestion 2016-01-25 20:53:25 +08:00
youngsterxyf 0e17e2a3d2 accept @JessonChan suggestion 2016-01-25 20:20:53 +08:00
youngsterxyf ecf24640fd fix issue #1566 2016-01-23 16:56:54 +08:00
astaxie 9adf20d72e gofmt -s 2016-01-17 23:57:07 +08:00
JessonChan fb5b04506a code refactor and format 2016-01-13 09:24:27 +08:00
JessonChan 7663d50c97 remove the lock writer 2016-01-13 09:21:55 +08:00
JessonChan 58730e3528 test file modify 2016-01-13 09:21:32 +08:00
JessonChan e1b73b33d0 improve code 2016-01-13 08:21:44 +08:00
JessonChan c535dc386e fast format 2016-01-12 22:54:39 +08:00
JessonChan 69804afc1b use pool to logMsg 2016-01-12 22:39:40 +08:00
JessonChan 164366ae0d return error 2016-01-12 22:33:52 +08:00
JessonChan 2b9d7ff714 remove log package 2016-01-12 22:32:36 +08:00
JessonChan bd0f3c29fa decr malloc new object 2016-01-12 22:32:20 +08:00
JessonChan 12e7f0f94a extract a func to write to every logger 2016-01-12 21:15:25 +08:00
JessonChan 482b7a62bd use array not map 2016-01-12 21:05:06 +08:00
JessonChan baa2e9d64a code format 2016-01-12 19:44:28 +08:00
JessonChan 5511e03b52 embedding file writer 2016-01-12 19:25:33 +08:00
JessonChan 9507e59c2f camel name fixed 2016-01-12 19:10:08 +08:00
JessonChan 2479e61db9 add asynchronous and call depth benchmark 2016-01-12 19:09:00 +08:00
JessonChan c9b890b10e add asynchronous benchmark 2016-01-12 17:59:23 +08:00
JessonChan e32e3a759c console type no need to bench 2016-01-12 17:46:10 +08:00
astaxie 3bb22d149e add the comments 2016-01-04 22:22:42 +08:00
astaxie f0be45dfff fix the comments and json tag 2016-01-04 22:18:59 +08:00
astaxie cb0400dcd4 file add the config for Perm 2015-09-18 12:12:02 +08:00
astaxie 34877c52a9 golint logs 2015-09-11 23:08:24 +08:00
astaxie f9fe89fff0 fix the file rotate test case issues 2015-09-04 22:33:03 +08:00
astaxie 9ab7466d5c fix the cappital 2015-09-04 22:20:55 +08:00
Hubery 59b903d557 set DoRotate fname like xx.2013-01-01.2.log
fix fname,by extension to identify the file type on mac and windows.
2015-07-15 17:00:48 +08:00
astaxie c8f6e0f156 remove the hardcode in runtime.Caller 2015-06-15 20:53:49 +08:00
astaxie d629c1d3d0 change the comments 2015-06-15 20:22:05 +08:00
astaxie 817650aa33 keep the short name for logs 2015-06-15 20:20:37 +08:00
astaxie d9bb1a3592 logs support elasticsearch adapter 2015-06-13 00:25:48 +08:00
astaxie 9c6775c22c log default use synchro, and support async 2015-06-13 00:25:21 +08:00
wuranbo 23268b788a *feature) 增加logcalldepth接口,使得能简单再次封装log系列函数。 2015-05-25 09:10:36 +08:00
toalexjin 5b1705b2d6 Do not check log level in writerMsg() because the check is already done outside. 2015-05-25 09:10:35 +08:00
toalexjin 2e51c124f1 For enhancing performance, check log level before fmt.Sprintf() 2015-05-25 09:10:35 +08:00
fuxiaohei 77c1109134 code simplify for package logs 2015-02-23 11:42:46 +08:00
DeanThompson 6a9d04c269 count log file lines 2014-11-21 18:12:39 +08:00
astaxie a2428af8a7 compatibility for warn & info function add one more depth 2014-11-03 16:48:45 +08:00
astaxie 90a7ce5c6a split the file for logs 2014-11-03 16:45:42 +08:00
astaxie ef3c7c127b fix the variable 2014-11-03 16:44:05 +08:00
astaxie 88caf1ed70 if read the log.go then calldepth add 1 2014-11-03 16:43:07 +08:00
astaxie 304beaf89f update the log call deep 2014-11-03 16:40:08 +08:00
astaxie 2288ac868c remove the deep Caller 2014-11-03 16:34:36 +08:00
astaxie 71149218d1 fix the log level 2014-10-30 17:43:32 +08:00
astaxie 1636a7271c Revert "fix the log test"
This reverts commit ddbfc25e56.
2014-10-30 16:57:55 +08:00
astaxie 68c3bdfdd4 Revert "logs:default support fileline"
This reverts commit 1f26852610.
2014-10-30 16:57:48 +08:00
astaxie ddbfc25e56 fix the log test 2014-10-28 19:34:11 +08:00
astaxie 1f26852610 logs:default support fileline 2014-10-28 19:33:14 +08:00
astaxie 9b40271878 fix the less ` 2014-08-27 15:53:08 +08:00
astaxie 770dc702f0 Merge pull request #782 from francoishill/patch-19
Extra field if username is empty
2014-08-27 15:36:07 +08:00
Francois 2d94f7797b Type in the printout of each level's prefix 2014-08-26 14:03:03 +02:00
Francois 61ce608847 Update smtp.go 2014-08-26 12:47:05 +02:00
astaxie 2fe559701c fix the import 2014-08-26 15:43:18 +08:00
astaxie fcc9d8c45f Merge pull request #778 from francoishill/patch-15
Update file.go
2014-08-26 14:42:52 +08:00
astaxie e51a9d6481 Merge pull request #779 from francoishill/patch-17
Print error if occurred in WriteMsg
2014-08-26 14:42:05 +08:00
Francois 44ea260db1 Allow mail with self-signed certificates
For more information, refer to https://groups.google.com/forum/#!topic/golang-nuts/c9zEiH6ixyw
2014-08-26 06:52:18 +02:00
Francois 1d1ad69954 Print error if occurred in WriteMsg 2014-08-26 06:37:35 +02:00
Francois 59773dfabe Update file.go
New pull request for "Panic sometimes occurs at time 00h00 on windows, then the app crashes."
2014-08-26 06:25:59 +02:00
astaxie 7f977a0c8c beego: change the colour 2014-08-20 11:54:25 +08:00
astaxie a144769515 update the documents & comments 2014-08-18 16:41:43 +08:00
stansun a804d242d9 revise a comment
If it gets a msg from the buffer chan, it will write the message to
outputs.
2014-07-27 07:13:17 -04:00
Francois 6ce55e8884 Update smtp.go (develop branch)
For mail servers that do not require Authentication we must pass NIL for the SendMail parameter 2 (the auth parameter). Otherwise it fails to send the mail.
2014-07-22 07:21:47 +02:00
Frederic G. MARAND 7d09ac252a Issue #682: convert logs package to RFC5424 logging levels. 2014-07-11 11:15:34 +02:00
astaxie fefd8ddb5b beego: update licence& fix #669 2014-07-03 23:40:21 +08:00
astaxie 0f170a80da update the comments fix #658 2014-06-25 10:39:37 +08:00
astaxie c188cbbcb4 update all files License 2014-05-17 02:26:50 +08:00
astaxie 4245521660 fix #576 2014-05-17 02:26:50 +08:00
astaxie 3f1de576e4 fix go run hello.go & console log 2014-04-04 09:57:51 +08:00
slene f48ca96a7e beego: fix log output when SetLogger has error 2014-04-04 09:57:45 +08:00
slene 9421a21037 beego: fix log output when SetLogger has error 2014-04-04 09:57:37 +08:00
asta.xie 9c5ceb70cc Logs: modify StartLogger to private 2014-04-02 23:43:37 +08:00
asta.xie 3f5fee2dc6 Logs support file & filenum 2014-03-25 23:48:58 +08:00
asta.xie 589f97130c add w.Rotate 2014-03-21 14:33:11 +08:00
cloudaice d93f112083 fixed bug: in logs package check if platform is windows 2014-01-28 11:26:43 +08:00
cloudaice 11e6c2829b diffrent level logs display diffrent color 2014-01-21 18:00:17 +08:00
FuXiaoHei 94ad13c846 add comments in logs package 2013-12-30 23:32:57 +08:00
slene 764bbd9897 #390 should use filepath.Dir instead of path.Dir for. 2013-12-19 19:04:57 +08:00
1fei b87e122ac4 Update smtp.go 2013-12-19 18:16:06 +08:00
1fei dcaff38cb9 Update file.go 2013-12-19 18:15:46 +08:00
1fei b68c814c50 Update console.go
使用json直接初始化系统变量,代码更简单,并且便于后期扩展
2013-12-19 18:15:00 +08:00
1fei 9076ce7d17 Update conn.go
使用json直接初始化相关变量,代码更简单。如果把协议的首字母改大写会更简单,但不好改谢大的协议。
2013-12-19 18:13:10 +08:00
astaxie 48ad0202bf update some tips 2013-12-07 13:26:28 +08:00
astaxie ba5e393e99 add flush & read all chan data 2013-11-27 17:50:10 +08:00
astaxie 02a03cec33 add logs readme 2013-09-10 18:44:29 +08:00
astaxie 4922237847 sleep some time for send mail 2013-08-28 15:55:34 +08:00
astaxie 2424618163 delete default console & add bench test 2013-08-28 15:48:48 +08:00
astaxie f92973794e finish logs module 2013-08-27 23:49:04 +08:00