Skip to content
Snippets Groups Projects
Commit 9a69ff18 authored by KERDREUX Jerome's avatar KERDREUX Jerome
Browse files

Switch go slog

parent 331ec8fe
No related branches found
No related tags found
No related merge requests found
......@@ -22,8 +22,10 @@ func New${Name}(addr uuid.UUID) *xaal.Device {
value = 'nil'
if type_ == 'data = bool':
value = 'false'
elif type_ in ['data = uint','data = number']:
elif type_ in ['data = uint',]:
value = 0
elif type_ in ['data = number',]:
value = 0.0
elif unit in ['K']:
value = 0
elif unit in ['%','%EL','%RH','°']:
......@@ -44,10 +46,10 @@ func New${Name}(addr uuid.UUID) *xaal.Device {
% if len(keys) != 0 :
${camel_meth} := func(args xaal.MessageBody) *xaal.MessageBody {
// Arguments: ${print_keys}
log.Printf("${camel_meth} method: ${meth} args: %v\n", args)
slog.Info("${camel_meth} method: ${meth}", slog.Any("args",args))
% else:
${camel_meth} := func(xaal.MessageBody) *xaal.MessageBody {
log.Printf("${camel_meth} method: ${meth}\n")
slog.Info("${camel_meth} method: ${meth}")
% endif
return nil
}
......
package xaalschemas
package schemas
import (
"log"
xaal "xAAL/xaal"
"log/slog"
"github.com/google/uuid"
"gitlab.imt-atlantique.fr/xaal/code/go/core/uuid"
"gitlab.imt-atlantique.fr/xaal/code/go/core/xaal"
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment