From fadb4fd9f4efa4eebcda5c4c883b19aed48dce4b Mon Sep 17 00:00:00 2001 From: jiajunye Date: Wed, 23 Sep 2020 19:51:16 +0000 Subject: [PATCH 1/5] add customized logging to overview doc Signed-off-by: jiajunye --- docs/root/overview.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/root/overview.md b/docs/root/overview.md index 58fa5f117..9f783d18a 100644 --- a/docs/root/overview.md +++ b/docs/root/overview.md @@ -189,3 +189,6 @@ other formats (e.g. human, fortio). It can be very useful to always store the json output format, yet be able to easily get to one of the other output formats. It’s like having the cake and eating it too! +## User-specified Nighthawk logging + +Users can use their own Nighthawk logging options when calling **ENVOY_LOG**. Basically it would require two steps: 1) Create a logging sink delegate inherited from [Envoy SinkDelegate](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h). 2) Constructor a ServiceImpl object with an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format. From f8dfdd790655e6da01146b005ad7d5989d8dd34f Mon Sep 17 00:00:00 2001 From: jiajunye Date: Wed, 23 Sep 2020 19:58:44 +0000 Subject: [PATCH 2/5] update format Signed-off-by: jiajunye --- docs/root/overview.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/root/overview.md b/docs/root/overview.md index 9f783d18a..c97e12ecd 100644 --- a/docs/root/overview.md +++ b/docs/root/overview.md @@ -191,4 +191,7 @@ formats. It’s like having the cake and eating it too! ## User-specified Nighthawk logging -Users can use their own Nighthawk logging options when calling **ENVOY_LOG**. Basically it would require two steps: 1) Create a logging sink delegate inherited from [Envoy SinkDelegate](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h). 2) Constructor a ServiceImpl object with an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format. +Users can use their own Nighthawk logging options when calling **ENVOY_LOG**. +Basically it would require two steps: 1) Create a logging sink delegate +inherited from [Envoy SinkDelegate](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h). 2) Constructor a ServiceImpl object with +an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format. From 701ab40f99e70c2e6443f6eafef4fc4bb0b507b9 Mon Sep 17 00:00:00 2001 From: jiajunye Date: Thu, 24 Sep 2020 00:15:03 +0000 Subject: [PATCH 3/5] enhance readability Signed-off-by: jiajunye --- docs/root/overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/root/overview.md b/docs/root/overview.md index c97e12ecd..f47fba9d7 100644 --- a/docs/root/overview.md +++ b/docs/root/overview.md @@ -192,6 +192,6 @@ formats. It’s like having the cake and eating it too! ## User-specified Nighthawk logging Users can use their own Nighthawk logging options when calling **ENVOY_LOG**. -Basically it would require two steps: 1) Create a logging sink delegate -inherited from [Envoy SinkDelegate](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h). 2) Constructor a ServiceImpl object with -an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format. +Basically it would require two steps: +1. Create a logging sink delegate inherited from [Envoy SinkDelegate](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h). +2. Constructor a ServiceImpl object with an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format. From c5a97835f44cda85e7cc47bc43bd55215d603178 Mon Sep 17 00:00:00 2001 From: jiajunye Date: Fri, 25 Sep 2020 03:48:10 +0000 Subject: [PATCH 4/5] minor update Signed-off-by: jiajunye --- docs/root/overview.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/root/overview.md b/docs/root/overview.md index f47fba9d7..e0c00c953 100644 --- a/docs/root/overview.md +++ b/docs/root/overview.md @@ -191,7 +191,9 @@ formats. It’s like having the cake and eating it too! ## User-specified Nighthawk logging -Users can use their own Nighthawk logging options when calling **ENVOY_LOG**. -Basically it would require two steps: +Users of Nighthawk can specify custom format and destination (logging sink +delegate) for all Nighthawk logging messages. Nighthawk utilizes the Envoy's +logging mechanism by performing all logging via the **ENVOY_LOG** macro. To +customize this mechanism, users need to perform two steps: 1. Create a logging sink delegate inherited from [Envoy SinkDelegate](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h). 2. Constructor a ServiceImpl object with an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format. From 3bedae8544a44ee4fc3e15257aaae3ce80b39ca9 Mon Sep 17 00:00:00 2001 From: jiajunye Date: Fri, 2 Oct 2020 21:33:03 +0000 Subject: [PATCH 5/5] fix typo Signed-off-by: jiajunye --- docs/root/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/root/overview.md b/docs/root/overview.md index e0c00c953..7d53c419f 100644 --- a/docs/root/overview.md +++ b/docs/root/overview.md @@ -196,4 +196,4 @@ delegate) for all Nighthawk logging messages. Nighthawk utilizes the Envoy's logging mechanism by performing all logging via the **ENVOY_LOG** macro. To customize this mechanism, users need to perform two steps: 1. Create a logging sink delegate inherited from [Envoy SinkDelegate](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h). -2. Constructor a ServiceImpl object with an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format. +2. Construct a ServiceImpl object with an [Envoy Logger Context](https://github.com/envoyproxy/envoy/blob/master/source/common/common/logger.h) which contains user-specified log level and format.