MCPcopy Create free account
hub / github.com/Scalingo/cli / RouterLogs

Function RouterLogs

apps/routing_settings.go:54–74  ·  view source on GitHub ↗
(ctx context.Context, appName string, enable bool)

Source from the content-addressed store, hash-verified

52}
53
54func RouterLogs(ctx context.Context, appName string, enable bool) error {
55 c, err := config.ScalingoClient(ctx)
56 if err != nil {
57 return errors.Wrapf(ctx, err, "fail to get Scalingo client")
58 }
59
60 _, err = c.AppsRouterLogs(ctx, appName, enable)
61 if err != nil {
62 return errors.Wrapf(ctx, err, "fail to configure router-logs feature")
63 }
64
65 var action string
66 if enable {
67 action = "enable"
68 } else {
69 action = "disable"
70 }
71
72 io.Statusf("Router logs have been %sd on %s\n", action, appName)
73 return nil
74}

Callers 1

Calls 2

ScalingoClientFunction · 0.92
StatusfFunction · 0.92

Tested by

no test coverage detected