1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-24 08:02:32 +02:00
Commit Graph

39 Commits

Author SHA1 Message Date
Lukasz Raczylo
a7522e7d6c
fix: struct field alignment (#2632) 2023-04-26 02:16:34 +02:00
David Brouwer
a3980c2308
feat: add test framework & refactor RPC server (#2579)
Co-authored-by: Rene Jochum <rene@jochum.dev>
2022-10-20 13:00:50 +02:00
David Brouwer
85c0b0b8eb
fix: some linting issues (#2563) 2022-09-30 16:27:07 +02:00
Mohamed MHAMDI
1db36357d5
feat(logger): add logger option to all micro components (override DefaultLogger) closes #2556 (#2559)
* feat(logger): add logger option to all components

* fix: refactor api/rpc.go

* fix: refactor api/stream.go

* fix: api/options.go comment

* fix(logger): do not use logger.Helper internally

* fix(logger): fix comments

* fix(logger): use level.Enabled method

* fix: rename mlogger to log

* fix: run go fmt

* fix: log level

* fix: factories

Co-authored-by: Mohamed MHAMDI <mmhamdi@hubside.com>
Co-authored-by: Davincible <david.brouwer.99@gmail.com>
2022-09-29 16:44:53 +02:00
Asim Aslam
1cd7cfaa6c
go-micro.dev/v4 (#2305) 2021-10-12 12:55:53 +01:00
Arsen
3b60db0dcd
logger helper: add "inject" method, to make a pair with "extract" (#2283) 2021-09-23 16:48:08 +01:00
Arsen
916ed6b8ee
logger: caller's skip correction (#2280) 2021-09-22 09:01:03 +01:00
gregkv
00d819a199
Remove fields map from Helper, add Extract method and fix for defaultLogger.Fields (#2274) 2021-09-19 10:40:09 +01:00
JeffreyBool
acc3f5479f
fix service default logger (#2171)
* Update http.go

Exit before deregister is executed

* Create http.go

Exit before deregister is executed

* Solve the problem that the resources have not been fully released due to early exit

* Optimize some code

* Optimize some code

* Optimize some code

* fix service default logger
2021-05-23 08:38:20 +01:00
Asim Aslam
d94936f6c9
v3 (#2104)
* v3

* revert plugins

* fixup some issues
2021-01-20 13:54:31 +00:00
johnson
cc79692d68 make caller filepath package/file style
this code is from zap
9a9fa7d4b5/zapcore/entry.go (L101)
2020-05-26 14:33:56 +08:00
Janos Dobronszki
434997e676
Display only logging file name as opposed to path in logs (#1580) 2020-04-27 09:55:50 +01:00
Janos Dobronszki
ec44b67e9f
Fixing log file path in logs (#1578) 2020-04-27 09:36:09 +01:00
Vasiliy Tolstov
980b772801
fix races in web and logger (#1576)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-26 17:41:36 +03:00
Vasiliy Tolstov
a22da39e1c
logger: add caller info to default implementation (#1575)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-04-26 17:11:53 +03:00
Vasiliy Tolstov
beaa434610
logger: fix reading env var (#1414)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-25 22:00:43 +00:00
Vasiliy Tolstov
3543b275e0
fix log level helper (#1342)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-13 17:36:42 +03:00
Vasiliy Tolstov
7b385bf163
minimize allocations in logger and tunnel code (#1323)
* logs alloc

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* fix allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* tunnel allocs

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* try to fix tunnel

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* cache cipher for send

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* more logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-11 17:55:39 +00:00
Vasiliy Tolstov
241614ff68
add helper function to determine logger level (#1321)
* add helper function to determine logger level

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-09 23:43:05 +03:00
ben-toogood
e3ce45495a
os.Exit on log.Fatal (#1316)
* os.Exit on log.Fatal

* Fix TestOptions

Co-authored-by: Ben Toogood <ben@micro.mu>
2020-03-09 09:23:42 +00:00
ben-toogood
9386f36a13
Exit on log.Fatal (#1297) 2020-03-04 13:46:01 +00:00
Vasiliy Tolstov
89ba602e17
logger fixes and improvements (#1285)
* fix helper fields
* add metadata output for default logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-03 11:07:37 +03:00
Vasiliy Tolstov
b555269b1b
copy fields in helper (#1281)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-03-02 14:18:36 +00:00
Vasiliy Tolstov
6b8930a960
add new helper method to logger (#1273)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-29 00:39:41 +00:00
Vasiliy Tolstov
d0a978bd50
redesign logger (#1272)
* redesign logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-29 03:31:59 +03:00
Vasiliy Tolstov
64a5ce9607
various fixes (#1267)
* logger: remove Panic log level

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/grpc: add missing Unlock in Subscribe error

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server: minor code change

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/grpc: extend test suite with pub/sub testing

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/grpc: fix invalid check and allow subscriber error to be returned

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* server/grpc: add pubsub tests

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* client/grpc: check for nil req/rsp

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-26 18:34:40 +00:00
Eric
53c3bff819
add Panic & Panicf to logger (#1258)
* add Panic & Panicf to logger
2020-02-25 17:44:29 +03:00
Vasiliy Tolstov
cf0b39eaac
logger fixes (#1244)
* logger: fix race conditions

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* restore util/log for compatibility

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-24 13:07:40 +00:00
Vasiliy Tolstov
117f56ebf7
prune util/log and user logger (#1237)
* prune util/log and user logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* plaintext logger

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* add newline

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-23 13:45:20 +00:00
Asim Aslam
116855572b
Add log level helper funtions (#1229) 2020-02-21 08:43:23 +00:00
Asim Aslam
ee977acfef
strip SetGlobalLevel (#1228) 2020-02-21 08:28:21 +00:00
Sumanth Chinthagunta
3fa7c26946
logger with helper methods (#1216)
* support unix daemon socket

* refactor(logger): logger fields changed to map[string]interface{}

* improvement(logger): adding string to Level Parser

* improvement(logger): rename ParseLevel to GetLevel

* refactor(logger): adding basic logger

adding micro default logger, and refactor logger interface

* refactor(logger): moved basic logger to top level package

* refactor(logger): adding default logger
2020-02-21 07:57:59 +00:00
Asim Aslam
78df154a4d
move log level setting to option (#1222) 2020-02-20 08:26:12 +00:00
Sumanth Chinthagunta
fc5339a368
[W.I.P] refactor(logger): logger fields changed to map[string]interface{} (#1198)
* support unix daemon socket

* refactor(logger): logger fields changed to map[string]interface{}

* improvement(logger): adding string to Level Parser

* improvement(logger): rename ParseLevel to GetLevel
2020-02-15 18:19:28 +00:00
Vasiliy Tolstov
c706afcf04
logger helper to pass down it via context (#1180)
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2020-02-09 21:26:46 +00:00
Asim Aslam
0e9b4c26a4 import with braces 2020-02-06 21:39:08 +00:00
Asim Aslam
d40b13a045 mux to mtx 2020-02-06 21:37:17 +00:00
Asim Aslam
4079b22c1e reorder logger methods 2020-02-06 21:36:33 +00:00
Shu xian
fdfb2bc4c1
[WIP] logger first (#1161)
* logger first

* log->logger

* update comment

* add context in Options

* add Fields

* remove logfi

* add field encode

* add common Field Types

* update logger field
2020-02-06 21:35:46 +00:00