Date   
Rob Pike on Go 2.0

Trevor.Conn@...
 

Dell Customer Communication

https://youtu.be/RIvL2ONhFBI

 

FYI -- An interesting presentation from Rob Pike on the current thinking (no commitments yet) around the major new features planned for Go 2.0

 

Trevor Conn

Senior Principal Software Engineer

Dell Technologies | IoT DellTech

Trevor.Conn@...

Round Rock, TX USA

 

Re: [Edgex-devel] Serverless

Drasko DRASKOVIC <drasko@...>
 

Hi Tiejun,
Application WG is working on making new architecture for Export Services.

So far we analyzing 2 approaches - one with the message bus, and other
with Functions as a Service.

You can follow Application WG work here:
https://wiki.edgexfoundry.org/display/FA/Applications+Working+Group
and join the meetings.

Best regards,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor
EdgeX Foundry TSC member

www.mainflux.com | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn: https://www.linkedin.com/in/draskodraskovic
Twitter: @draskodraskovic

On Wed, Oct 17, 2018 at 2:44 AM Tiejun Chen <tiejunc@...> wrote:

Drasko,

Have you worked on enabling serverless/faas on EdgeX? On my side I'm interested in this area.

Thanks
Tiejun

-----Original Message-----
From: EdgeX-Devel@... <EdgeX-Devel@...>
On Behalf Of Drasko DRASKOVIC
Sent: Wednesday, October 17, 2018 3:10 AM
To: edgex-devel@...; edgex-golang@...
Subject: [Edgex-devel] Serverless

Interesting watch:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.yout
ube.com%2Fwatch%3Fv%3DVa6Ve9oKNyY&amp;data=02%7C01%7Ctiejunc%40v
mware.com%7Ccd1de4381a674350fa1c08d6339af187%7Cb39138ca3cee4b4aa4
d6cd83d9dd62f0%7C1%7C0%7C636753137908225102&amp;sdata=iG%2BMu7
PKKEwKz%2BlZ8VOYAo2K9ncmt0j0Iyh6WrTdkc0%3D&amp;reserved=0

We did not mention this one:
-
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fserverless.
com%2Fevent-
gateway%2F&amp;data=02%7C01%7Ctiejunc%40vmware.com%7Ccd1de4381a6
74350fa1c08d6339af187%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%
7C636753137908235108&amp;sdata=rVm1EFKtwFOSYLyzneP%2B0hICZBZeZFH8
d3DlSFBXgyw%3D&amp;reserved=0
-
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
m%2Fserverless%2Fevent-
gateway&amp;data=02%7C01%7Ctiejunc%40vmware.com%7Ccd1de4381a67435
0fa1c08d6339af187%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C63
6753137908235108&amp;sdata=JOl5VENJx6JP7Qxgbr9jUSK5GtWXBiAZJDYBT9y3
w7Q%3D&amp;reserved=0

BR,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor
EdgeX Foundry TSC member

https://na01.safelinks.protection.outlook.com/?url=www.mainflux.com&amp;da
ta=02%7C01%7Ctiejunc%40vmware.com%7Ccd1de4381a674350fa1c08d6339af1
87%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636753137908235
108&amp;sdata=G15Aqhw2bEH1TCAgxIrbOdJxdY2fc3nJOTDzqn%2F0KPM%3D&a
mp;reserved=0 | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linke
din.com%2Fin%2Fdraskodraskovic&amp;data=02%7C01%7Ctiejunc%40vmware.c
om%7Ccd1de4381a674350fa1c08d6339af187%7Cb39138ca3cee4b4aa4d6cd83d
9dd62f0%7C1%7C0%7C636753137908235108&amp;sdata=TcEtM%2Bui7djf%2F
rY0kzHgQgkD2gardk0Zuuov73l4UDM%3D&amp;reserved=0
Twitter: @draskodraskovic


Re: [Edgex-devel] Serverless

Tiejun Chen <tiejunc@...>
 

Drasko,

Have you worked on enabling serverless/faas on EdgeX? On my side I'm interested in this area.

Thanks
Tiejun

-----Original Message-----
From: EdgeX-Devel@... <EdgeX-Devel@...>
On Behalf Of Drasko DRASKOVIC
Sent: Wednesday, October 17, 2018 3:10 AM
To: edgex-devel@...; edgex-golang@...
Subject: [Edgex-devel] Serverless

Interesting watch:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.yout
ube.com%2Fwatch%3Fv%3DVa6Ve9oKNyY&amp;data=02%7C01%7Ctiejunc%40v
mware.com%7Ccd1de4381a674350fa1c08d6339af187%7Cb39138ca3cee4b4aa4
d6cd83d9dd62f0%7C1%7C0%7C636753137908225102&amp;sdata=iG%2BMu7
PKKEwKz%2BlZ8VOYAo2K9ncmt0j0Iyh6WrTdkc0%3D&amp;reserved=0

We did not mention this one:
-
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fserverless.
com%2Fevent-
gateway%2F&amp;data=02%7C01%7Ctiejunc%40vmware.com%7Ccd1de4381a6
74350fa1c08d6339af187%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%
7C636753137908235108&amp;sdata=rVm1EFKtwFOSYLyzneP%2B0hICZBZeZFH8
d3DlSFBXgyw%3D&amp;reserved=0
-
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
m%2Fserverless%2Fevent-
gateway&amp;data=02%7C01%7Ctiejunc%40vmware.com%7Ccd1de4381a67435
0fa1c08d6339af187%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C63
6753137908235108&amp;sdata=JOl5VENJx6JP7Qxgbr9jUSK5GtWXBiAZJDYBT9y3
w7Q%3D&amp;reserved=0

BR,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor
EdgeX Foundry TSC member

https://na01.safelinks.protection.outlook.com/?url=www.mainflux.com&amp;da
ta=02%7C01%7Ctiejunc%40vmware.com%7Ccd1de4381a674350fa1c08d6339af1
87%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636753137908235
108&amp;sdata=G15Aqhw2bEH1TCAgxIrbOdJxdY2fc3nJOTDzqn%2F0KPM%3D&a
mp;reserved=0 | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linke
din.com%2Fin%2Fdraskodraskovic&amp;data=02%7C01%7Ctiejunc%40vmware.c
om%7Ccd1de4381a674350fa1c08d6339af187%7Cb39138ca3cee4b4aa4d6cd83d
9dd62f0%7C1%7C0%7C636753137908235108&amp;sdata=TcEtM%2Bui7djf%2F
rY0kzHgQgkD2gardk0Zuuov73l4UDM%3D&amp;reserved=0
Twitter: @draskodraskovic


Serverless

Drasko DRASKOVIC <drasko@...>
 

Interesting watch: https://www.youtube.com/watch?v=Va6Ve9oKNyY

We did not mention this one:
- https://serverless.com/event-gateway/
- https://github.com/serverless/event-gateway

BR,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor
EdgeX Foundry TSC member

www.mainflux.com | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn: https://www.linkedin.com/in/draskodraskovic
Twitter: @draskodraskovic

Re: Support-Logging Mongo Configuration

Joan Duran
 

In the other microservices (core-data, core-metada and core-client) the collection names used by MongoDB are defined in internal/pkg/db/db.go.

As you said, should be fine to remove this parameter and add a const (LogCollection?) in internal/pkg/db/db.go file.

Best regards,
Joan


El 26/09/18 a les 23:48, Trevor.Conn@... ha escrit:

Dell - Internal Use - Confidential

I have a question for the community –

 

I’m working on the ConfigV2 changes for the support-logging service and in its configuration for Mongo, it has an anomalous property for MongoCollection. This is in addition to the database name signified by the MongoDB property. These are currently set as follows:

 

MongoDB = 'logging' #DBName

MongoCollection = 'logEntry' #Collection within the above DB

 

No other service specifies a collection in addition to the database name, instead choosing to just write all documents into the specified database. Indeed having a collection called “logEntry” inside of a “logging” database sounds redundant to me.

 

ConfigV2 has the following structure for specifying database configuration settings:

[Databases]
  [Databases.Primary]
  Host = 'localhost'
  Name = 'coredata'
  Password = ''
  Port = 27017
  Username = ''
  Timeout = 5000
  Type = 'mongodb'

 

I would like to standardize on this by removing the need for a MongoCollection from the support-logging configuration. Are there any objections?

 

Trevor Conn

Senior Principal Software Engineer

Dell Technologies | IoT DellTech

Trevor.Conn@...

Round Rock, TX USA

 


Support-Logging Mongo Configuration

Trevor.Conn@...
 

Dell - Internal Use - Confidential

I have a question for the community –

 

I’m working on the ConfigV2 changes for the support-logging service and in its configuration for Mongo, it has an anomalous property for MongoCollection. This is in addition to the database name signified by the MongoDB property. These are currently set as follows:

 

MongoDB = 'logging' #DBName

MongoCollection = 'logEntry' #Collection within the above DB

 

No other service specifies a collection in addition to the database name, instead choosing to just write all documents into the specified database. Indeed having a collection called “logEntry” inside of a “logging” database sounds redundant to me.

 

ConfigV2 has the following structure for specifying database configuration settings:

[Databases]
  [Databases.Primary]
  Host = 'localhost'
  Name = 'coredata'
  Password = ''
  Port = 27017
  Username = ''
  Timeout = 5000
  Type = 'mongodb'

 

I would like to standardize on this by removing the need for a MongoCollection from the support-logging configuration. Are there any objections?

 

Trevor Conn

Senior Principal Software Engineer

Dell Technologies | IoT DellTech

Trevor.Conn@...

Round Rock, TX USA

 

Re: Welcome to EdgeX-GoLang@lists.edgexfoundry.org

qq
 

hello


15599633@...

 
Date: 2018-09-18 20:28
Subject: Welcome to EdgeX-GoLang@...

Hello,

Welcome to the EdgeX-GoLang@... group at EdgeX Foundry. Please take a moment to review this message.

To learn more about the EdgeX-GoLang@... group, please visit https://lists.edgexfoundry.org/g/EdgeX-GoLang

To start sending messages to members of this group, simply send email to EdgeX-GoLang@...

If you do not wish to belong to EdgeX-GoLang@..., you may unsubscribe by sending an email to EdgeX-GoLang+unsubscribe@...

To see and modify all of your groups, go to https://lists.edgexfoundry.org


Regards,

The EdgeX-GoLang@... Moderator

EdgeX in Action, 3rd blog post

Drasko DRASKOVIC <drasko@...>
 

Hi all,
I just published 3rd part of the blog covering our official tutorial,
just with some additional info and running everything natively (not in
Docker) - so with some additional tuning of config files and such.
Here it is: https://medium.com/mainflux-iot-platform/edgex-in-action-part-3-sending-commands-and-events-46a5820ec9e8

These series are intended fr developers, as a currently missing
Developer's Guide (at least "Getting Started" chapter of it).

All comments are welcome.

BR,
Drasko DRASKOVIC
Mainflux Author and Technical Advisor
EdgeX Foundry TSC member

www.mainflux.com | Industrial IoT Cloud
-------------------------------------------------------------------
Engineering Division | Paris, France

LinkedIn: https://www.linkedin.com/in/draskodraskovic
Twitter: @draskodraskovic

Go 1.11 released

Trevor.Conn@...
 

Dell - Internal Use - Confidential

https://blog.golang.org/go1.11

 

Consider this a discussion item on next week’s Core Working Group agenda. Features I’m excited about include modules (this is the vgo preview) and the User Annotation enhancements to tracing. More on the latter here.

 

Trevor Conn

Senior Principal Software Engineer

Dell Technologies | IoT DellTech

Trevor.Conn@...

Round Rock, TX USA

 

Re: How can I control the ouput of logs based on log level

James.White2@...
 

Perfect – thanks Jianjiao – I wanted to make sure you get credit for your participation in the project!

Jim

 

From: sunjj@... [mailto:sunjj@...]
Sent: Wednesday, August 15, 2018 7:58 PM
To: White2, James; espy@...; EdgeX-GoLang
Cc: Ahmad, Akram; Cotter, Eric
Subject: Re: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi Jim,

    I  submitted the issue just nowhttps://github.com/edgexfoundry/edgex-go/issues/484

Thanks,

Jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

From: James.White2

Date: 2018-08-15 23:12

Subject: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Thanks Tony.  Yes, our team chatted about it and I have it teed up for Eric Cotter to work (Eric is the owner of all the supporting services from my team).  We lost the capability between Java and Go code for some reason.

 

Jianjiao – since you are the one that brought the attention to light, would you like to submit the issue?  Otherwise Tony or our team can.

 

Thanks

jim

 

From: Tony Espy [mailto:espy@...]
Sent: Wednesday, August 15, 2018 8:58 AM
To: White2, James; sunjj@...; EdgeX-GoLang@...
Cc: Ahmad, Akram
Subject: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

On 8/9/18 2:27 PM, James.White2@... wrote:

Jianjiao,

You may have identified a shortcoming in our Go work.  We are discussing internally.  Give me a bit of time to work this within the community and get back to you.

Jim --

This is a known issue, and was last discussed when Trevor brought up his structured logging proposal.

If you'd like, I can enter a github issue, as the same bug impacts the Go device SDK.

By the way, here's a good article which describes the problem:

https://dave.cheney.net/2015/11/05/lets-talk-about-logging

Regards,
/tony

p.s. I'd also like to see our loggingClient support builtin printf style formatting like the Go log package. I'll add an issue for that as well.




Jim

 

From: sunjj@... [mailto:sunjj@...]
Sent: Wednesday, August 08, 2018 1:59 AM
To: White2, James; EdgeX-GoLang
Cc: Ahmad, Akram
Subject:
回复: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi Jim,

Thank you for your answer.  sorry I didn't describe the question clearly yesterday.

 

I am using the Go service of core data.  Is there a configuration in  cmd/core-data/res/configuration.toml  just as java's application.yml(logging.level.org.edgexfoundry=INFO)

 

Thank you!

Jianjiao

 

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

发件人: James.White2

发送时间: 2018-08-07 23:32

收件人: sunjj@...; EdgeX-GoLang@...

抄送: Akram.Ahmad@...

主题: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Jianjiano,

 

Courtesy of Akram Ahmad from my team, the following should help:

 

Assuming you are working with the new Go services.  In the Go services you can set the log level in each service call with this function

func (lc EdgeXLogger) log(logLevel string, msg string, labels []string) error {

}

 

To set the level more universally for that service, set the following config option:

/config/application/logging.level.root :  This specifies the level of logging mechanism, the value is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.

 

Similar options and capability are also in the older Java services if you need it.

 

See https://nexus.edgexfoundry.org/content/sites/docs/staging/master/docs/_build/html/Ch-Logging.html for more info on the logging service.

 

Hope this helps.

Jim

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of sunjj@...
Sent: Monday, August 06, 2018 9:52 PM
To: EdgeX-GoLang
Subject: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi,

    How can I control the ouput of logs based on log level 

Thanks,

jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

Re: How can I control the ouput of logs based on log level

sunjj@mingdutech.com
 

Hi Jim,
    I  submitted the issue just now(https://github.com/edgexfoundry/edgex-go/issues/484
Thanks,
Jianjiao


孙建蛟 -- 研发部  IOT
************************************************************
浙江明度智控科技有限公司
公司地址:浙江省杭州市滨江区江虹南路316号京安创业园
工厂地址:江苏省昆山市汉浦路1937号欣昆产业园
电 话:0571-88196008   传 真:0571-86718570
邮 箱:sunjj@mingdutech.com

 
Date: 2018-08-15 23:12
Subject: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Thanks Tony.  Yes, our team chatted about it and I have it teed up for Eric Cotter to work (Eric is the owner of all the supporting services from my team).  We lost the capability between Java and Go code for some reason.

 

Jianjiao – since you are the one that brought the attention to light, would you like to submit the issue?  Otherwise Tony or our team can.

 

Thanks

jim

 

From: Tony Espy [mailto:espy@...]
Sent: Wednesday, August 15, 2018 8:58 AM
To: White2, James; sunjj@...; EdgeX-GoLang@...
Cc: Ahmad, Akram
Subject: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

On 8/9/18 2:27 PM, James.White2@... wrote:

Jianjiao,

You may have identified a shortcoming in our Go work.  We are discussing internally.  Give me a bit of time to work this within the community and get back to you.

Jim --

This is a known issue, and was last discussed when Trevor brought up his structured logging proposal.

If you'd like, I can enter a github issue, as the same bug impacts the Go device SDK.

By the way, here's a good article which describes the problem:

https://dave.cheney.net/2015/11/05/lets-talk-about-logging

Regards,
/tony

p.s. I'd also like to see our loggingClient support builtin printf style formatting like the Go log package. I'll add an issue for that as well.



Jim

 

From: sunjj@... [mailto:sunjj@...]
Sent: Wednesday, August 08, 2018 1:59 AM
To: White2, James; EdgeX-GoLang
Cc: Ahmad, Akram
Subject:
回复: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi Jim,

Thank you for your answer.  sorry I didn't describe the question clearly yesterday.

 

I am using the Go service of core data.  Is there a configuration in  cmd/core-data/res/configuration.toml  just as java's application.yml(logging.level.org.edgexfoundry=INFO)

 

Thank you!

Jianjiao

 

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

发件人: James.White2

发送时间: 2018-08-07 23:32

收件人: sunjj@...; EdgeX-GoLang@...

抄送: Akram.Ahmad@...

主题: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Jianjiano,

 

Courtesy of Akram Ahmad from my team, the following should help:

 

Assuming you are working with the new Go services.  In the Go services you can set the log level in each service call with this function

func (lc EdgeXLogger) log(logLevel string, msg string, labels []string) error {

}

 

To set the level more universally for that service, set the following config option:

/config/application/logging.level.root :  This specifies the level of logging mechanism, the value is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.

 

Similar options and capability are also in the older Java services if you need it.

 

See https://nexus.edgexfoundry.org/content/sites/docs/staging/master/docs/_build/html/Ch-Logging.html for more info on the logging service.

 

Hope this helps.

Jim

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of sunjj@...
Sent: Monday, August 06, 2018 9:52 PM
To: EdgeX-GoLang
Subject: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi,

    How can I control the ouput of logs based on log level 

Thanks,

jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

Re: How can I control the ouput of logs based on log level

James.White2@...
 

Thanks Tony.  Yes, our team chatted about it and I have it teed up for Eric Cotter to work (Eric is the owner of all the supporting services from my team).  We lost the capability between Java and Go code for some reason.

 

Jianjiao – since you are the one that brought the attention to light, would you like to submit the issue?  Otherwise Tony or our team can.

 

Thanks

jim

 

From: Tony Espy [mailto:espy@...]
Sent: Wednesday, August 15, 2018 8:58 AM
To: White2, James; sunjj@...; EdgeX-GoLang@...
Cc: Ahmad, Akram
Subject: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

On 8/9/18 2:27 PM, James.White2@... wrote:

Jianjiao,

You may have identified a shortcoming in our Go work.  We are discussing internally.  Give me a bit of time to work this within the community and get back to you.

Jim --

This is a known issue, and was last discussed when Trevor brought up his structured logging proposal.

If you'd like, I can enter a github issue, as the same bug impacts the Go device SDK.

By the way, here's a good article which describes the problem:

https://dave.cheney.net/2015/11/05/lets-talk-about-logging

Regards,
/tony

p.s. I'd also like to see our loggingClient support builtin printf style formatting like the Go log package. I'll add an issue for that as well.



Jim

 

From: sunjj@... [mailto:sunjj@...]
Sent: Wednesday, August 08, 2018 1:59 AM
To: White2, James; EdgeX-GoLang
Cc: Ahmad, Akram
Subject:
回复: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi Jim,

Thank you for your answer.  sorry I didn't describe the question clearly yesterday.

 

I am using the Go service of core data.  Is there a configuration in  cmd/core-data/res/configuration.toml  just as java's application.yml(logging.level.org.edgexfoundry=INFO)

 

Thank you!

Jianjiao

 

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

发件人: James.White2

发送时间: 2018-08-07 23:32

收件人: sunjj@...; EdgeX-GoLang@...

抄送: Akram.Ahmad@...

主题: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Jianjiano,

 

Courtesy of Akram Ahmad from my team, the following should help:

 

Assuming you are working with the new Go services.  In the Go services you can set the log level in each service call with this function

func (lc EdgeXLogger) log(logLevel string, msg string, labels []string) error {

}

 

To set the level more universally for that service, set the following config option:

/config/application/logging.level.root :  This specifies the level of logging mechanism, the value is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.

 

Similar options and capability are also in the older Java services if you need it.

 

See https://nexus.edgexfoundry.org/content/sites/docs/staging/master/docs/_build/html/Ch-Logging.html for more info on the logging service.

 

Hope this helps.

Jim

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of sunjj@...
Sent: Monday, August 06, 2018 9:52 PM
To: EdgeX-GoLang
Subject: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi,

    How can I control the ouput of logs based on log level 

Thanks,

jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

Re: How can I control the ouput of logs based on log level

espy
 

On 8/9/18 2:27 PM, James.White2@... wrote:

Jianjiao,

You may have identified a shortcoming in our Go work.  We are discussing internally.  Give me a bit of time to work this within the community and get back to you.

Jim --

This is a known issue, and was last discussed when Trevor brought up his structured logging proposal.

If you'd like, I can enter a github issue, as the same bug impacts the Go device SDK.

By the way, here's a good article which describes the problem:

https://dave.cheney.net/2015/11/05/lets-talk-about-logging

Regards,
/tony

p.s. I'd also like to see our loggingClient support builtin printf style formatting like the Go log package. I'll add an issue for that as well.


Jim

 

From: sunjj@... [mailto:sunjj@...]
Sent: Wednesday, August 08, 2018 1:59 AM
To: White2, James; EdgeX-GoLang
Cc: Ahmad, Akram
Subject:
回复: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi Jim,

Thank you for your answer.  sorry I didn't describe the question clearly yesterday.

 

I am using the Go service of core data.  Is there a configuration in  cmd/core-data/res/configuration.toml  just as java's application.yml(logging.level.org.edgexfoundry=INFO)

 

Thank you!

Jianjiao

 

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

发件人: James.White2

发送时间: 2018-08-07 23:32

收件人: sunjj@...; EdgeX-GoLang@...

抄送: Akram.Ahmad@...

主题: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Jianjiano,

 

Courtesy of Akram Ahmad from my team, the following should help:

 

Assuming you are working with the new Go services.  In the Go services you can set the log level in each service call with this function

func (lc EdgeXLogger) log(logLevel string, msg string, labels []string) error {

}

 

To set the level more universally for that service, set the following config option:

/config/application/logging.level.root :  This specifies the level of logging mechanism, the value is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.

 

Similar options and capability are also in the older Java services if you need it.

 

See https://nexus.edgexfoundry.org/content/sites/docs/staging/master/docs/_build/html/Ch-Logging.html for more info on the logging service.

 

Hope this helps.

Jim

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of sunjj@...
Sent: Monday, August 06, 2018 9:52 PM
To: EdgeX-GoLang
Subject: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi,

    How can I control the ouput of logs based on log level 

Thanks,

jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com


Re: How can I control the ouput of logs based on log level

James.White2@...
 

Jianjiao,

You may have identified a shortcoming in our Go work.  We are discussing internally.  Give me a bit of time to work this within the community and get back to you.

Jim

 

From: sunjj@... [mailto:sunjj@...]
Sent: Wednesday, August 08, 2018 1:59 AM
To: White2, James; EdgeX-GoLang
Cc: Ahmad, Akram
Subject:
回复: Re: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi Jim,

Thank you for your answer.  sorry I didn't describe the question clearly yesterday.

 

I am using the Go service of core data.  Is there a configuration in  cmd/core-data/res/configuration.toml  just as java's application.yml(logging.level.org.edgexfoundry=INFO)

 

Thank you!

Jianjiao

 

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

 

发件人: James.White2

发送时间: 2018-08-07 23:32

收件人: sunjj@...; EdgeX-GoLang@...

抄送: Akram.Ahmad@...

主题: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Jianjiano,

 

Courtesy of Akram Ahmad from my team, the following should help:

 

Assuming you are working with the new Go services.  In the Go services you can set the log level in each service call with this function

func (lc EdgeXLogger) log(logLevel string, msg string, labels []string) error {

}

 

To set the level more universally for that service, set the following config option:

/config/application/logging.level.root :  This specifies the level of logging mechanism, the value is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.

 

Similar options and capability are also in the older Java services if you need it.

 

See https://nexus.edgexfoundry.org/content/sites/docs/staging/master/docs/_build/html/Ch-Logging.html for more info on the logging service.

 

Hope this helps.

Jim

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of sunjj@...
Sent: Monday, August 06, 2018 9:52 PM
To: EdgeX-GoLang
Subject: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi,

    How can I control the ouput of logs based on log level 

Thanks,

jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

Re: Test/Mock Tools in Go

Smith, Nick A <Nick.a.Smith@...>
 

FWIW internally we’ve had great success with Testify for mocking and asserts. The test code is generally clean and easy to read.

 

Nick

 



 
Nick Smith
Technology Strategist
Tel: +44 1223 703485
@thalesesecurity

Thales eSecurity
One Station Square
Cambridge CB1 2GA
United Kingdom



www.thalesesecurity.com

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of Trevor.Conn@...
Sent: 07 August 2018 16:49
To: edgex-golang@...
Subject: [Edgex-golang] Test/Mock Tools in Go

 

Dell Customer Communication

Hi all – I assigned myself an issue yesterday for taking a small piece of the EdgeX core services and refactoring toward greater unit test coverage. I believe that some of the techniques I first introduced to the codebase in the holding repo will be of benefit in this regard. However in order to accomplish that, I need help from mocking tools. At the time I created that holding repo project, I evaluated several tools in the Go ecosystem and the ones I settled on are:

 

Mockery – Used for creating mock types from interfaces, eliminates writing of boilerplate code.

Testify – Used for implementing test conditions and evaluations within mocked methods

 

I chose these because they were flexible and seemed to have the least overhead for integration. One of the other ones I looked at was Ginkgo but it seemed like overkill.

 

I am asking to see if anyone has strong feelings in this area about a particular package. If so, please call it out and I’ll take a look. Otherwise, does anyone have issues with using the above packages?

 

Trevor Conn

Senior Principal Software Engineer

Dell Technologies | IoT DellTech

Trevor.Conn@...

Round Rock, TX USA

 

回复: Re: [Edgex-golang] How can I control the ouput of logs based on log level

sunjj@mingdutech.com
 

Hi Jim,
Thank you for your answer.  sorry I didn't describe the question clearly yesterday.

I am using the Go service of core data.  Is there a configuration in  cmd/core-data/res/configuration.toml  just as java's application.yml(logging.level.org.edgexfoundry=INFO)。

Thank you!
Jianjiao



孙建蛟 -- 研发部  IOT
************************************************************
浙江明度智控科技有限公司
公司地址:浙江省杭州市滨江区江虹南路316号京安创业园
工厂地址:江苏省昆山市汉浦路1937号欣昆产业园
电 话:0571-88196008   传 真:0571-86718570
邮 箱:sunjj@mingdutech.com

 
发件人: James.White2
发送时间: 2018-08-07 23:32
抄送: Akram.Ahmad@...
主题: Re: [Edgex-golang] How can I control the ouput of logs based on log level

Jianjiano,

 

Courtesy of Akram Ahmad from my team, the following should help:

 

Assuming you are working with the new Go services.  In the Go services you can set the log level in each service call with this function

func (lc EdgeXLogger) log(logLevel string, msg string, labels []string) error {

}

 

To set the level more universally for that service, set the following config option:

/config/application/logging.level.root :  This specifies the level of logging mechanism, the value is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.

 

Similar options and capability are also in the older Java services if you need it.

 

See https://nexus.edgexfoundry.org/content/sites/docs/staging/master/docs/_build/html/Ch-Logging.html for more info on the logging service.

 

Hope this helps.

Jim

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of sunjj@...
Sent: Monday, August 06, 2018 9:52 PM
To: EdgeX-GoLang
Subject: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi,

    How can I control the ouput of logs based on log level 

Thanks,

jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

Test/Mock Tools in Go

Trevor.Conn@...
 

Dell Customer Communication

Hi all – I assigned myself an issue yesterday for taking a small piece of the EdgeX core services and refactoring toward greater unit test coverage. I believe that some of the techniques I first introduced to the codebase in the holding repo will be of benefit in this regard. However in order to accomplish that, I need help from mocking tools. At the time I created that holding repo project, I evaluated several tools in the Go ecosystem and the ones I settled on are:

 

Mockery – Used for creating mock types from interfaces, eliminates writing of boilerplate code.

Testify – Used for implementing test conditions and evaluations within mocked methods

 

I chose these because they were flexible and seemed to have the least overhead for integration. One of the other ones I looked at was Ginkgo but it seemed like overkill.

 

I am asking to see if anyone has strong feelings in this area about a particular package. If so, please call it out and I’ll take a look. Otherwise, does anyone have issues with using the above packages?

 

Trevor Conn

Senior Principal Software Engineer

Dell Technologies | IoT DellTech

Trevor.Conn@...

Round Rock, TX USA

 

Re: How can I control the ouput of logs based on log level

James.White2@...
 

Jianjiano,

 

Courtesy of Akram Ahmad from my team, the following should help:

 

Assuming you are working with the new Go services.  In the Go services you can set the log level in each service call with this function

func (lc EdgeXLogger) log(logLevel string, msg string, labels []string) error {

}

 

To set the level more universally for that service, set the following config option:

/config/application/logging.level.root :  This specifies the level of logging mechanism, the value is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, and OFF.

 

Similar options and capability are also in the older Java services if you need it.

 

See https://nexus.edgexfoundry.org/content/sites/docs/staging/master/docs/_build/html/Ch-Logging.html for more info on the logging service.

 

Hope this helps.

Jim

 

From: EdgeX-GoLang@... [mailto:EdgeX-GoLang@...] On Behalf Of sunjj@...
Sent: Monday, August 06, 2018 9:52 PM
To: EdgeX-GoLang
Subject: [Edgex-golang] How can I control the ouput of logs based on log level

 

Hi,

    How can I control the ouput of logs based on log level 

Thanks,

jianjiao

 


孙建蛟 -- 研发部  IOT

************************************************************

浙江明度智控科技有限公司

公司地址:浙江省杭州市滨江区江虹南路316号京安创业园

工厂地址:江苏省昆山市汉浦路1937号欣昆产业园

话:0571-88196008   真:0571-86718570

箱:sunjj@mingdutech.com

How can I control the ouput of logs based on log level

sunjj@mingdutech.com
 

Hi,
    How can I control the ouput of logs based on log level 
Thanks,
jianjiao


孙建蛟 -- 研发部  IOT
************************************************************
浙江明度智控科技有限公司
公司地址:浙江省杭州市滨江区江虹南路316号京安创业园
工厂地址:江苏省昆山市汉浦路1937号欣昆产业园
电 话:0571-88196008   传 真:0571-86718570
邮 箱:sunjj@mingdutech.com

Re: Decoupling Models From Mongo

espy
 

On 7/20/18 12:22 PM, Trevor.Conn@... wrote:

Hi all -- As part of the effort to separate EdgeX's internal and external model representations, we've made good progress in restructuring the project packages to clearly delineate which code is publicly exportable and which code is usable only my EdgeX internals. Currently, all application logic -- both internal and external -- is pointed to the externally available models located in pkg/models. The long term goal is to change that so that EdgeX has an internal representation of its model which can be changed independently of the contract model.


One of the challenges I've been wrestling with is the coupling we have to Mongo. Our models currently specify BSON serialization metadata (something no client should ever care about) as well as BSON.ObjectID properties and our application logic manages the creation and assignment of BSON.ObjectIDs rather than the underlying database platform. In the future state, if we'd like for the database to be swappable, we have to eliminate explicit knowledge of how to manage database keys and push any metadata about translating a type to a database representation down into the database layer.


Fede has made a good start down a path that will facilitate cleaner separation with his types in the db/mongo package, but there's more work that needs to be done. I want to summarize some points that I have in mind based on a day and a half of wrestling with how to achieve a clean separation between our business logic and the requirements of the underlying storage platform. These should not be taken as decisions, but visibility into what I'm currently thinking and an open request for comment.


  • Push all key and referential integrity management down to the database
    • This means no object should expose the internal primary key/_id value to the application above the database layer (like db/mongo above)
    • This means we standardize on a user-specified UUID which identifies entries and is the primary means by which we perform lookups from the application layer
+1
    • This means the given UUID field/column needs to be explictly indexed
      • Mongo example: db.event.createIndex({uuid: 1}, {name: "ix_event_uuid"})
Are their penalties for for having more than field being indexed?

    • This eliminates the need to force myriad, native database key datatypes into a generic representation (like string) for later verification and casting.
    • No application logic should ever be responsible for assigning these values
This likely means we need constructors for all of our external objects which use a common newGUUID() function.

  • For models at the database layer (like db/mongo above), suggest we use "Id" for the property containing the actual database key value
  • For models at all other layers (which will NOT have the above property) suggest we use "Key" as a string containing the user-defined UUID
I don't love this, as key is usually used in the context of SQL-like databases.  I think the GUIID should be identified as "Id", and internal DB keys should use "key" or "dbId", or something along those lines.
  • In cases where it is necessary for the database layer to obtain IDs of newly inserted records, we must require that the "driver" used by EdgeX is capable of providing this functionalty.
    • Example use case: see the AddEvent function
      • Our current mongo driver (gopkg.in/mgo.v2/bson) is incapable of returning the IDs of the newly inserted records for the readings, and so we must create those IDs in the application logic so that the DBRefs are aligned correctly when the event is stored.
      • If, however, we used the official Mongo go provider we would be able to obtain the IDs of newly inserted records due to support for Mongo's insertOne and insertMany capabilities.
    • NOTE: Our current mgo.v2 driver is no longer maintained, so we need to switch anyway!!!
+1

While listening to the Mongo presentation yesterday I decided to take a look at the license of mgo.v2 (written by one of my co-workers), and noticed it's *unsupported*.

Thanks for your attention in reading this. I'm not going to proceed any further down this path until I can get some feedback and clarity on the above points. As I said at the beginning, there are real benefits to the work done so far and once the export services have been re-organized to fit in the new package structure, we'll be in much better shape. But there's more work to be done and the primary intent of the original issue I created hasn't been addressed yet.

To ensure we follow through on making sure EdgeX is flexible enough to operate in a customer-defined environment, we have to decouple vendor-specific logic and types from the main application.
Thanks for the write-up Trevor, some really good stuff here.

Regards,
/tony




Trevor Conn
Senior Principal Software Engineer
Dell Technologies | IoT DellTech
Trevor_Conn@...
Round Rock, TX  USA